Skip to main content

fichub-cli

ko-fi

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

From pip (Recommended)

pip install -U fichub-cli

From Github Source (Pre-release, for testing new features by Beta testers)

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

Usage

> fichub_cli
Usage: fichub_cli [OPTIONS] COMMAND [ARGS]...

  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

Options:
  -u, --url TEXT          The url of the fanfiction enclosed within quotes
  -i, --infile TEXT       Path to a file to read URLs from
  -l, --list-url TEXT     Enter a comma separated list of urls to download,
                          enclosed within quotes
  -v, --verbose           Show fic stats
  -o,  --out-dir TEXT     Path to the Output directory for files (default:
                          Current Directory)
  --format TEXT           Download Formats, comma separated if multiple: epub (default), mobi, pdf or html
  --force                 Force overwrite of an existing file
  -ss, --supported-sites  List of supported sites
  -d,  --debug            Show the log in the console for debugging
  --changelog             Save the changelog file
  --debug-log             Save the logfile for debugging
  --config-init           Initialize the CLI config files
  --config-info           Show the CLI config info
  --version               Display version & quit
  --help                  Show this message and exit.

Default Configuration

  • The fanfiction will be downloaded in epub format. To change it, use --format followed by the format. Multiple formats can be selected by separating them by commas.
  • 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.

Example

  • To download using an 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"
  • To download multiple formats
fichub_cli -u "https://www.fanfiction.net/s/13720575/1/A-Cadmean-Victory-Remastered" --format epub,mobi
  • To generate a changelog of the download
fichub_cli -i urls.txt --changelog

NOTE

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

  • Using the --config-init flag, users can re-initialize/overwrite the config files to default.

  • Using the --config-info flag, users can get all the info about the config file and its settings.


Configuration

  • Users can configure centain things like db_up_time_format, fic_up_time_format, delete_output_log & filename_format by editing the config.json file in the app directory.

  • Filename format props (case-sensitive): author, fichubAuthorId, authorId, chapters, created, fichubId, genres, id, language, rated, fandom, status, updated, title

    Example:

    "filename_format": "[title] by [author]"
    
  • You can also add API keys to the api_key_v0 which will include it in the header when making API calls to fichub

  • To locate the config file, run fichub_cli --config-info and open the config.json file in an editor and make the necessary changes.

Notes

  • For db_up_time_format & fic_up_time_format:
    • Only use valid datetime formats
  • For delete_output_log:
    • Default is blank so it will always prompt for confirmation
    • Set it to "false" to always keep the file
    • Set it to "true" to always delete the file

Plugin Support

Read the wiki for more info.

Helper Scripts

Helper scripts can be found here. They can add small functionalities to the CLI without needing to create full-fledged plugins.

Links

Metadata

Release files for fichub-cli 0.10.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fichub-cli 0.10.3
File Size Uploaded
fichub_cli-0.10.3.tar.gz 18.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fichub-cli 0.10.3
File Interpreter ABI Platform
fichub_cli-0.10.3-py3-none-any.whl Python 3 none any Details

Total release size: 39.0 kB

Release files / fichub_cli-0.10.3.tar.gz

Download URL fichub_cli-0.10.3.tar.gz
Size 18.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3131315e9b82c22fc87cd0d454b31cc5f151c071cd7c625eac79079e1ebf865b
BLAKE2b-256 checksum
How to use checksums
c8c46716e8c3b8eb7ad218deb290617c35f8869287f32df0710cd789e7825587
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release files / fichub_cli-0.10.3-py3-none-any.whl

Download URL fichub_cli-0.10.3-py3-none-any.whl
Size 20.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6caa377c45d79974c9de8ce0fc469d6a7898a4cc92f81b2b7cf833cb09598c45
BLAKE2b-256 checksum
How to use checksums
1f2a880f38e379a7e0893d88f1b89e6ba2cf92a9af6d67c7c5c254c7a4a16bf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.10.3 This release

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.4

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page