AutoLibrarian is an automated audiobook organizer designed to work seamlessly with Audiobookshelf. It watches an input directory, identifies audiobooks, enriches metadata using external providers, and organizes them into a structured library.
- Automated Monitoring: Watches an input directory for new files.
- Smart Ingestion:
- Automatically extracts
.zip,.tar, and.tar.gzarchives. - Groups related files together.
- Waits for file transfers to complete before processing.
- Automatically extracts
- Intelligent Identification:
- Extracts metadata from embedded tags (ID3, MP4).
- Parses filenames and directory names.
- Merges data to get the best starting point.
- Metadata Enrichment:
- Fetches details from OpenLibrary, Google Books, and Audible.
- Retrieves Title, Author, Description, Year, ISBN, and Cover Art.
- Organization:
- Moves files to a structured library:
Author/Series/TitleorAuthor/Title. - Embeds correct tags into audio files.
- Generates
metadata.jsonfor Audiobookshelf. - Downloads cover art.
- Handles manual intervention for low-confidence matches.
- Moves files to a structured library:
- Integration:
- Triggers Audiobookshelf library scans upon completion.
- Configuration - Environment variables and settings.
- Architecture - How it works under the hood.
- Deployment - Docker and installation guide.
- Contributing - Development guide.
- Create a
docker-compose.yml:
version: "3.8"
services:
autolibrarian:
image: autolibrarian:latest
build: .
environment:
- INPUT_DIR=/input
- OUTPUT_DIR=/output
- ABS_URL=http://your-abs-instance:80
- ABS_API_KEY=your_api_key
volumes:
- ./input:/input
- ./library:/output-
Run the container:
docker-compose up -d
-
Drop an audiobook file or folder into
./input. AutoLibrarian will process it and move it to./library.
- Prerequisites: Ensure you have Python 3 installed on your system.
- Clone the Repository:
git clone https://github.com/your-username/AutoLibrarian.git cd AutoLibrarian - Set up Virtual Environment:
python -m venv .venv # Windows .venv\Scripts\activate # macOS/Linux source .venv/bin/activate
- Install Dependencies:
pip install -r requirements.txt
- Configure:
- Create a
.envfile by copying the example:cp config.env.example .env - Edit the
.envfile to match your setup (e.g.,INPUT_DIR,OUTPUT_DIR).
- Create a
- Run the Application:
python src/main.py