Skip to main content

A CLI for the fichub.net API

Project description

fichub-cli

A CLI for the fichub.net API

To report issues upstream for the supported sites, visit https://fichub.net/#contact

To report issues for the CLI, open an issue at https://github.com/FicHub/fichub-cli/issues

Installation

Using pip (Recommended)

pip install -U fichub-cli

From Source (Might have bugs, for testing only)

pip install git+https://github.com/FicHub/fichub-cli@main

Usage

> fichub_cli
Usage: fichub_cli [OPTIONS]

  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

Options:
  -u, --url TEXT         The url of the fanfiction enclosed within quotes
  -i, --infile TEXT      Give a filename to read URLs from
  -l, --list-url TEXT    Enter a comma separated list of urls to download, enclosed within quotes
  -v, --verbose          Verbose progressbar
  -o, --out-dir TEXT     Absolute path to the Output directory for files (default: Current Directory)
  -f, --format TEXT      Download Format: epub (default), mobi, pdf or html
  --force                Force overwrite of an existing file
  --get-urls TEXT        Get all story urls found from a page.Currently supports archiveofourown.org only
  -s, --supported-sites  List of supported sites
  -d, --debug            Show the log in the console for debugging
  --meta-json TEXT       Fetch only the metadata for the fanfiction in json format
  --log                  Save the logfile for debugging
  --version              Display version & quit
  --help                 Show this message and exit

Default Configuration

  • 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.
  • --meta-json takes either URL or a file containing a list of URLs. --out-dir can be used to select an output directory.

Check fichub_cli --help for more info.

Example

  • To download using a URL
fichub_cli -u https://archiveofourown.org/works/10916730/chapters/24276864
  • To download using a file containing URLs
fichub_cli -i urls.txt
  • To download using a comma separated list of URLs
fichub_cli -l "https://www.fanfiction.net/s/11191235/1/Harry-Potter-and-the-Prince-of-Slytherin,https://www.fanfiction.net/s/13720575/1/A-Cadmean-Victory-Remastered"

NOTE --out-dir can be used in all the above commands to select an output directory.


  • To get all story urls found from a page. Currently supports archiveofourown.org only.
fichub_cli --get-urls https://archiveofourown.org/users/flamethrower/
  • To fetch only the metadata for the fanfiction in json format.
fichub_cli --meta-json "https://www.fanfiction.net/s/12933896/1/Things-you-cannot-leave-behind"
fichub_cli --meta-json urls.txt
fichub_cli --meta-json urls.txt --out-dir "~/Desktop/books"

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fichub-cli-0.4.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fichub_cli-0.4.3-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file fichub-cli-0.4.3.tar.gz.

File metadata

  • Download URL: fichub-cli-0.4.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for fichub-cli-0.4.3.tar.gz
Algorithm Hash digest
SHA256 824c9a4de82e993b623b0db31ac8059c6718ff8eb89013fdb970a89f2cc92f2a
MD5 1826dd8f6f9dd67e78d56588f289b6e0
BLAKE2b-256 4f268afbb933a3b6a4b40a54e1ed8af728d9ad1bb3d65a647d87a6c15e244682

See more details on using hashes here.

File details

Details for the file fichub_cli-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: fichub_cli-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.0.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for fichub_cli-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b6dfd68999787a7bfe19b36bcdeb888a34cf35f9f4e5685d3def13e0d3ed2465
MD5 c2e9e99abf36e7b7fbe2ebaf9c152208
BLAKE2b-256 7520980959ed4d03f67b5dc50278dc7a30e10c6f8e5a6b5633504e63df847cd9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page