Skip to main content

The Project Gutenberg tool to orchestrate ebook generation.

Project description

# ebookconverter code that orchestrates ebook conversion for project gutenberg

EbookConverter manages the creation and update of ebook assets for Project Gutenberg. It uses a postgres database to keep track of both ebook metadata and ebook files. the postgress database is managed by the libgutenberg package.

The cron-rebuild-files.sh script runs as a cron job, rebuilding 2100 books per day, so as to rebuild every book roughly once a month.

ebookconverter talks to the gutenberg database to build a list of ebookmaker jobs. These jobs require some metadata about the book, and a target file to process.

ebookconverter expects source files to be in numbered directories in a ‘files’ directory. The location of the files directory is given by the FILESDIR config parameter.

Config parameters should be set in a file at /etc/ebookconverter.conf or ~/.ebookconverter

ebookconverter has been tested on Python 3.6.7. It’s not expected to run on python 2.7

## Installing

pipenv install ebookconverter

The following directories should exist:
  • $PRIVATE/logs

  • $PRIVATE/logs/json

  • $PRIVATE/logs/json/backup

  • $PRIVATE/logs/notifications

  • $PRIVATE/logs/dopush

  • $PRIVATE/logs/dopush/backup

## Using the EbookConverter Scripts

you can run these commands either by first entering a pipenv shell or on a single line using pipenv run <command> <args>

Rebuild one or more books ebookconverter –range=<start>-<finish> –build=all ebookconverter –range=<booknumber> –build=all ebookconverter –range=<booknumber> –build=all –validate

Reload metadata from a workflow json file (use with care, it will overwrite any metadata in the DB) reload_workflow <booknumber>

Regenerate the csv file make_csv

Look for any ebooks with changed files in the last X days and then check if any of the previously known files of that ebook have been deleted.

autodelete

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

ebookconverter-0.9.4.tar.gz (43.4 kB view details)

Uploaded Source

File details

Details for the file ebookconverter-0.9.4.tar.gz.

File metadata

  • Download URL: ebookconverter-0.9.4.tar.gz
  • Upload date:
  • Size: 43.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.11

File hashes

Hashes for ebookconverter-0.9.4.tar.gz
Algorithm Hash digest
SHA256 c6fba6b6055f553988e49ef8c38fa3a7be6f3709c28e6d72d25370b067413e0f
MD5 52ec5876b2019d801ab3a8f88560485b
BLAKE2b-256 a453d054b8dc0aa7f16778e5999a6f4083109e6a84334898724215d87b939e49

See more details on using hashes here.

Supported by

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