-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new: Script to delete a feed and reimport it
Fix #9
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from vulnerabilitylookup import VulnerabilityLookup | ||
|
||
vl = VulnerabilityLookup() | ||
|
||
|
||
def reimport_feed(): | ||
for source in vl.get_sources(): | ||
data = input(f'Do you want to reimport {source} from scratch?\n\tIf yes, type the name of the source. Otherwise, hit enter.') | ||
if data == source: | ||
if vl.del_source(source): | ||
print(f'{source} deleted.') | ||
else: | ||
print(f'Unable to delete {source}') | ||
else: | ||
print(f'*not* deleting {source}') | ||
|
||
|
||
if __name__ == "__main__": | ||
print('Any feed you remove with this script will be reimported from scratch next time the feeder runs.') | ||
reimport_feed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from .vulnerabilitylookup import VulnerabilityLookup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters