A few QoL tools for uploaders
- Python >= 3.10
- httpx==0.27.2
- langcodes==3.4.0
- pathvalidate==3.2.0
- PyYAML==6.0.2
- Requests==2.32.3
- run pip install -r requirements.txt to install dependencies
- copy templates/default_config.cfg into config/settings.json and modify your settings and defaults (cache_path, metadata, input_path, output_path)
- the following config setting can be overriden by command line parameters: metadata, input_path, output_path, dry_run, verbose
##Actions
This script supports 5 actions: "createJson", "createTorrent", "prep4upload", "mylib2mam", "scanLibrary", "sanitizeLibrary"
Action | Description | --metadata | --book (multi-value param) |
---|---|---|---|
createJson | creates a Json fast fill file that can be copied and pasted on the upload page | audible | ASIN eg: B0BKPCDWF3 |
ISBN eg: 9780698146402 |
|||
file | path to yaml file eg: /path/to/file.txt |
||
libation | path to M4B file eg: /path/to/libation/title [asin].m4b |
||
mam | search text "Ilona Andrews Magic Breaks" |
||
createTorrent | creates a torrent file for book | n/a | path to folder |
prep4upload | takes a libation book, hardlink files to upload folder, creates torrent and json fast fill file | n/a | path to M4B file |
scanLibrary | walks thru your Libation libary, checks MAM and exports it to file | n/a | path to Libation books root folder |
mylib2mam | takes a CSV file and for each file, prepares it for upload | n/a | path to library CSV file (generated by scanLibrary) |
sanitizeLibrary | walks thru the tree and fixes file names in the passed folder (example, removes colons (:)) | n/a | path to root |
Generate JSONFastFillout file from Audible metadata
python uploader-tools.py createJson --book [list of ASIN/ISBN] --metadata audible
Generate JSONFastFillout file from Google metadata
python uploader-tools.py createJson --book [list of ISBN] --metadata google
Generate JSONFastFillout file from a local file (must be a yaml file)
python uploader-tools.py createJson --book [list of file paths] --metadata file
Generate JSONFastFillout file from a libation exported metadata
python uploader-tools.py createJson --book [list of libation M4B paths] --metadata libation
Prep files for upload : hardlinks files to the upload folder, generates torrent file and corresponding JsonFastFillout file. Metadata is generated from the Libation metadata.json file
python uploader-tools.py prep4upload --book [list of libation M4B paths]
Scans thru your library, checks for missing MAM files and exports to a CSV
python uploader-tools.py scanLibrary --book [path to my libation library root]
Prep files for upload for all files in my library generated by scanLibrary
python uploader-tools.py mylib2mam --book [path to my library csv]
- GoogleBooks API is notorious for returning 429 (rate limits)