mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-22 20:23:12 +00:00
Merge pull request #9 from Neavend/master
Fix default parameters parsing and typo in logs when no links found
This commit is contained in:
commit
055eb6f446
1 changed files with 5 additions and 8 deletions
13
archive.py
13
archive.py
|
@ -187,7 +187,7 @@ def create_archive(service_file, service, resume=None):
|
|||
|
||||
if not links:
|
||||
if service == "pocket":
|
||||
print('[X] No links found in {}, is it a getpocket.com/export export?'.format(serivce_file))
|
||||
print('[X] No links found in {}, is it a getpocket.com/export export?'.format(service_file))
|
||||
elif service == "pinboard":
|
||||
print ('[X] No links found in {}, is it a pinboard.in/export/format:json/ export?'.format(service_file))
|
||||
raise SystemExit(1)
|
||||
|
@ -208,12 +208,9 @@ def create_archive(service_file, service, resume=None):
|
|||
|
||||
if __name__ == '__main__':
|
||||
service_file = 'ril_export.html'
|
||||
resume = None
|
||||
try:
|
||||
service_file = sys.argv[1] # path to export file
|
||||
service = sys.argv[2] or "pocket" # select service for file format select
|
||||
resume = sys.argv[3] # timestamp to resume dowloading from
|
||||
except IndexError:
|
||||
pass
|
||||
argc = len(sys.argv)
|
||||
service_file = sys.argv[1] if argc > 1 else "ril_export.html" # path to export file
|
||||
service = sys.argv[2] if argc > 2 else "pocket" # select service for file format select
|
||||
resume = sys.argv[3] if argc > 3 else None # timestamp to resume dowloading from
|
||||
|
||||
create_archive(service_file, service, resume=resume)
|
||||
|
|
Loading…
Reference in a new issue