Skip to main content

A powerful CLI tool for managing e-book metadata and organizing your digital library.

Project description

Book Strands

Current version Downloads

Build status codecov

A powerful CLI tool for managing e-book metadata and organizing your digital library.

Overview

Book Strands is designed to help you manage your e-book collection by providing tools to read, modify, and organize e-book metadata. It supports popular e-book formats and can automatically organize your files based on author, series, and other metadata.

Features

  • Read metadata from e-books including title, author, series info, and ISBN
  • Write/modify metadata in your e-books
  • Organize your library by automatically renaming and moving files based on customizable patterns
  • Support for multiple formats: EPUB, MOBI, AZW and AZW3
  • Intelligent processing using AI-powered tools to manage your collection

Installation

# Install from PyPI
pip install book-strands

Requirements

  • Python 3.12 or higher
  • Calibre installed

Usage

book-strands run /path/to/your/ebooks /path/to/organized/library \
  --output-format "{{author}}/{{series}}/{{title}}.{{extension}}"

Output format can be described in plain language as it is an interpreted format.

You can also import and organize existing e-book files:

book-strands import-local-books /path/to/existing/books /path/to/organized/library

Configuration

Book Strands uses a configuration file located at ~/.config/book-strands.conf. Here's an example configuration:

[zlib-logins]
user1@example.com = password1
user2@example.com = password2

The zlib-logins section contains email and password pairs for Z-Library accounts used for downloading books.

Local LLMs

You can also use any local (or remote) Ollama-hosted LLM by setting --ollama and configuring it with the below parameters:

--ollama-model TEXT   Ollama model to use  [default: qwen3:8b]
--ollama-url TEXT     Ollama server URL  [default: http://localhost:11434]

Development

To enable tracing of agent requests, start a Jaeger instance and set the below environment variable, then access Jaeger on http://localhost:16686

docker run -d --name jaeger \
  -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
  -e COLLECTOR_OTLP_ENABLED=true \
  -p 6831:6831/udp \
  -p 6832:6832/udp \
  -p 5778:5778 \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 14250:14250 \
  -p 14268:14268 \
  -p 14269:14269 \
  -p 9411:9411 \
  jaegertracing/all-in-one:latest

export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4318"

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

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

book_strands-0.7.6.tar.gz (193.1 kB view details)

Uploaded Source

Built Distribution

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

book_strands-0.7.6-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file book_strands-0.7.6.tar.gz.

File metadata

  • Download URL: book_strands-0.7.6.tar.gz
  • Upload date:
  • Size: 193.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.7

File hashes

Hashes for book_strands-0.7.6.tar.gz
Algorithm Hash digest
SHA256 a494ce796e1b8db49a03b495f833dae71de517af4cdcfb8eb47b3c4bb37cbdae
MD5 4728e2b2f0929b74f31ef2663f270ea2
BLAKE2b-256 cbb9356724f0f96d402cf32fec9a162868b96814b4c75176c14d8ab0be54308f

See more details on using hashes here.

File details

Details for the file book_strands-0.7.6-py3-none-any.whl.

File metadata

File hashes

Hashes for book_strands-0.7.6-py3-none-any.whl
Algorithm Hash digest
SHA256 9d9699ee0f84a159a4b209cb369f9694785c49fa677edada499a8d218b2b9ae2
MD5 23e8bb3ecc26ac551192bc720f8707db
BLAKE2b-256 d706ada346e16f00a67125abaac39139892ad7cb3b037b95cdf33204864ac7be

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