Skip to main content

A tool to standardize audiobook files into single m4b files with clean metadata based on Audible and chapters.

Project description

PyPI GitHub PyPI - Python Version Python package CodeFactor Grade PyPI - Downloads

Functionality

The steps accomplished by using this tool are as follows:

  • Easy batch inputs via -i folder1/ folder2/* file.mp3 etc.
  • Only user input required is one ASIN per book.
  • Converts mp3(s) into single m4b files
    • Matches existing bitrate and samplerate for target file.
    • Standardizes chapter names, like 'Chapter 1'.
  • Merges or edits m4a/m4b into single m4b file, without re-converting.
  • Moves input file/folder to done folder when processed.

Audible data features:

  • Title, author(s), narrator(s), series, release year, description
    • For generating folder structure
    • For seeding M4b metadata fields
  • Chapters (title and length) used for m4b/m4a inputs.

Dependencies

This tool uses m4b-merge for it's file processing. Installation instructions can be found on the project's readme.

CLI usage

usage: m4b-merge [-h] -i INPUTS [INPUTS ...] [--log_level LOG_LEVEL]

m4b-merge cli

optional arguments:
  -h, --help            show this help message and exit
  -i INPUTS [INPUTS ...], --inputs INPUTS [INPUTS ...]
                        Input paths to process
  --log_level LOG_LEVEL
                        Set logging level
  • Check the user editable variables in config.py, and see if there's anything you need to change.
  • On first run, you will be prompted to signin to Audible. This is a one-time process that will be saved to your system's relevant config folder, under m4b-merge.

Module usage

If you are a developer wanting to use this in a project, you can import the modules as so: from m4b_merge import audible_helper, config, helpers, m4b_helper

And then creating the objects you need (from audible_helper.BookData(asin) and m4b_helper.M4bMerge(input_data, metadata)) You can see more usage examples in the sister project, Bragi Books

The parser function in audible_helper.BookData returns some extra data not used in the CLI here. This is a list of all data returned:

  • Title
  • Short Summary
  • Long Summary
  • Authors
  • Narrators
  • Series
  • Release Date
  • Publisher
  • Language
  • Runtime in minutes
  • Format type (abridged, unabridged, other)

Credits

  • Many thanks to mkb79 for their audible package.
  • Thanks to sandreas for their tireless work on m4b-tool

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

m4b-merge-0.3.5.7.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

m4b_merge-0.3.5.7-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file m4b-merge-0.3.5.7.tar.gz.

File metadata

  • Download URL: m4b-merge-0.3.5.7.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for m4b-merge-0.3.5.7.tar.gz
Algorithm Hash digest
SHA256 73c877afe89385771c4590b8cc3ea6ae09f585efcfa447add4a4f5716563f244
MD5 3065a72ee553f646bf26a67cc42f441c
BLAKE2b-256 a645a36788ca941e056e7b7fc8a75fd13c9d21ac2027fea221d3d517662ae9a6

See more details on using hashes here.

File details

Details for the file m4b_merge-0.3.5.7-py3-none-any.whl.

File metadata

  • Download URL: m4b_merge-0.3.5.7-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6

File hashes

Hashes for m4b_merge-0.3.5.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f524832791807db21159642ab80b86aa0c87526bcce5d0abc760a34d9d6294d5
MD5 38ffd5c296c8b75aaa58ec79974dd981
BLAKE2b-256 4715370073ad668b61f6730689da75afebae1c20f55e0b657ed9b641f7006a75

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