Skip to content

Commit

Permalink
Added info about err.log for failed downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
arzkar committed Oct 6, 2021
1 parent e0d5a50 commit 2282dd2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ fichub_cli --meta-json "https://www.fanfiction.net/s/12933896/1/Things-you-canno

- The fanfiction will be downloaded in epub format. To change it, use `-f` followed by the format.
- The fanfiction will be downloaded in the current directory. To change it, use `-o` followed by the path to the directory.
- Failed downloads will be saved in the `err.log` file in the current directory.

Check `fichub_cli --help` for more info.

Expand Down
8 changes: 7 additions & 1 deletion fichub_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,24 @@
@click.option('--meta-json', 'meta_json', default=None, help='Fetch only the metadata for the fanfiction in json format.')
@click.option('--log', default=False, help='Save the logfile for debugging.', is_flag=True)
@click.option('-a', '--automated', default=False, help='For internal testing only.', is_flag=True, hidden=True)
@click.option('--pytest', default=False, help='To run pytest on the CLI for internal testing', is_flag=True, hidden=True)
@click.option('--version', default=False, help='Display version & quit.', is_flag=True)
def run_cli(infile: str, url: str, list_url: str, _format: str, get_urls: str,
out_dir: str, debug: bool, version: bool, log: bool,
supported_sites: bool, force: bool, automated: bool,
meta_json: str, verbose: bool):
meta_json: str, verbose: bool, pytest: bool):
"""
A CLI for the fichub.net API
To report issues upstream for supported sites, visit https://fichub.net/#contact
To report issues for the CLI, open an issue at https://github.com/FicHub/fichub-cli/issues
Failed downloads will be saved in the `err.log` file in the current directory.
"""
if pytest: # for internal testing
import pytest
pytest.main(['-v'])

if log:
debug = True
Expand Down

0 comments on commit 2282dd2

Please sign in to comment.