mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2025-02-16 21:38:33 +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 not links:
|
||||||
if service == "pocket":
|
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":
|
elif service == "pinboard":
|
||||||
print ('[X] No links found in {}, is it a pinboard.in/export/format:json/ export?'.format(service_file))
|
print ('[X] No links found in {}, is it a pinboard.in/export/format:json/ export?'.format(service_file))
|
||||||
raise SystemExit(1)
|
raise SystemExit(1)
|
||||||
|
@ -208,12 +208,9 @@ def create_archive(service_file, service, resume=None):
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
service_file = 'ril_export.html'
|
service_file = 'ril_export.html'
|
||||||
resume = None
|
argc = len(sys.argv)
|
||||||
try:
|
service_file = sys.argv[1] if argc > 1 else "ril_export.html" # path to export file
|
||||||
service_file = sys.argv[1] # path to export file
|
service = sys.argv[2] if argc > 2 else "pocket" # select service for file format select
|
||||||
service = sys.argv[2] or "pocket" # select service for file format select
|
resume = sys.argv[3] if argc > 3 else None # timestamp to resume dowloading from
|
||||||
resume = sys.argv[3] # timestamp to resume dowloading from
|
|
||||||
except IndexError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
create_archive(service_file, service, resume=resume)
|
create_archive(service_file, service, resume=resume)
|
||||||
|
|
Loading…
Add table
Reference in a new issue