Skip to content

Bash command that merges all MP3 files in the current directory into a single M4B file named after the folder.

License

Notifications You must be signed in to change notification settings

randallvg/abook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

abook – Audiobook Merger Script

abook is a Bash script function that automates the process of merging multiple .mp3 files in the current directory into a single .m4b audiobook file. It uses ffmpeg and temporary file management for a streamlined experience.

πŸ“¦ Features

  • Automatically combines all .mp3 files in the current directory
  • Outputs a .m4b file named after the current folder
  • Temporary files are automatically cleaned up
  • Simple help menu with -h or --help option

πŸ›  Requirements

  • bash
  • ffmpeg
  • gmktemp (GNU mktemp or equivalent for temporary files)

πŸ“‚ Usage

Step 1: Load the function in your shell

You can source the script or add the function to your .bashrc/.bash_profile:

source /path/to/abook.sh

Step 2: Run the command

Navigate to a folder containing MP3 files:

cd /path/to/mp3/files
abook

This will create a file called foldername.m4b in the same directory.

Help

abook -h

Displays usage instructions.

🧹 Cleanup

The script automatically deletes all temporary files it creates when it finishes or exits unexpectedly.

πŸ§ͺ Example

Suppose you have a directory /audiobooks/MyBook with:

01_intro.mp3
02_chapter1.mp3
03_chapter2.mp3

Running abook in that directory creates:

MyBook.m4b

πŸ“œ License

This project is licensed under the terms of the GNU General Public License v3.0.

About

Bash command that merges all MP3 files in the current directory into a single M4B file named after the folder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages