mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
cli experience improvements
This commit is contained in:
parent
e2a5e0136c
commit
43c471e4af
6 changed files with 33 additions and 12 deletions
|
@ -483,7 +483,7 @@ def add(import_str: Optional[str]=None,
|
|||
|
||||
check_data_folder(out_dir=out_dir)
|
||||
|
||||
if import_str and import_path:
|
||||
if (import_str and import_path) or (not import_str and not import_path):
|
||||
stderr(
|
||||
'[X] You should pass either an import path as an argument, '
|
||||
'or pass a list of links via stdin, but not both.\n',
|
||||
|
@ -492,7 +492,7 @@ def add(import_str: Optional[str]=None,
|
|||
raise SystemExit(2)
|
||||
elif import_str:
|
||||
import_path = save_stdin_to_sources(import_str, out_dir=out_dir)
|
||||
else:
|
||||
elif import_path:
|
||||
import_path = save_file_to_sources(import_path, out_dir=out_dir)
|
||||
|
||||
check_dependencies()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue