Skip to main content

A library to help create, maintain and index a digital library of electronic book, youtube transcripts and summaries of them

Project description

Resource Librarian

A Python library for creating, maintaining, and indexing a personal library of digital resources. Organize your books and YouTube video transcripts in a filesystem-based structure that's perfect for AI processing.

PyPI version Python 3.11+ License: MIT

What is Resource Librarian?

Resource Librarian helps you build a filesystem-based knowledge library from:

  • Books (PDF, EPUB, Markdown)
  • YouTube videos (transcripts and metadata)

No database required - everything is organized in plain files with YAML metadata and Markdown indices.

Key Features

๐Ÿ“š Book Management

  • Supports PDF, EPUB, and Markdown formats
  • Auto-extracts metadata (title, author, ISBN)
  • Automatically splits EPUB into chapters
  • Preserves all original formats
  • Organizes by author with normalized naming

๐ŸŽฅ YouTube Video Management

  • Downloads transcripts automatically (no API key needed for transcripts)
  • Captures video metadata (title, channel, publish date, tags)
  • Organizes by channel
  • Resumable batch processing for large collections

๐Ÿ—‚๏ธ Library Organization

  • Filesystem-first - All content stored as files, no database
  • YAML manifests - Structured metadata for each resource
  • Searchable catalog - YAML-based catalog for quick lookups
  • Generated indices - Beautiful Markdown index pages for navigation
  • Auto-regenerated - Indices update when resources are added

Installation

pip install resource-librarian

Quick Start

Initialize a Library

# Create a new library
rl init my-library
cd my-library

Add Books

# Add a single book
rl book add /path/to/book.epub --author "Author Name"

# Import a folder of books
rl book import-folder /path/to/books/

# List all books
rl book list

# Get book details
rl book get "Book Title"

Add YouTube Videos

# Set up YouTube API key (for metadata only)
export YOUTUBE_API_KEY="your-api-key-here"

# Fetch a video transcript
rl video fetch https://youtube.com/watch?v=VIDEO_ID

# List all videos
rl video list

# Get video details
rl video get "Video Title"

Manage Your Library

# Rebuild catalog from filesystem
rl catalog rebuild

# Show library statistics
rl catalog stats

# Migrate old library format
rl catalog migrate --library /path/to/old-library

Library Structure

Your library is organized in a clean, filesystem-based structure:

my-library/
โ”œโ”€โ”€ catalog.yaml                    # Library catalog
โ”œโ”€โ”€ _index/
โ”‚   โ””โ”€โ”€ README.md                   # Library overview
โ”œโ”€โ”€ books/
โ”‚   โ”œโ”€โ”€ _index/
โ”‚   โ”‚   โ”œโ”€โ”€ authors.md              # Books by author
โ”‚   โ”‚   โ””โ”€โ”€ titles.md               # Books by title
โ”‚   โ””โ”€โ”€ author-lastname-firstname/
โ”‚       โ””โ”€โ”€ book-title/
โ”‚           โ”œโ”€โ”€ manifest.yaml       # Book metadata
โ”‚           โ”œโ”€โ”€ full-book-formats/
โ”‚           โ”‚   โ”œโ”€โ”€ book.epub       # Original EPUB
โ”‚           โ”‚   โ”œโ”€โ”€ book.pdf        # Original PDF
โ”‚           โ”‚   โ”œโ”€โ”€ book.md         # Extracted markdown
โ”‚           โ”‚   โ””โ”€โ”€ chapters/       # Individual chapters
โ”‚           โ””โ”€โ”€ summaries/          # Book summaries
โ””โ”€โ”€ videos/
    โ”œโ”€โ”€ _index/
    โ”‚   โ””โ”€โ”€ channels.md             # Videos by channel
    โ””โ”€โ”€ channel-name__CHANNEL-ID/
        โ””โ”€โ”€ VIDEO-ID__video-title/
            โ”œโ”€โ”€ manifest.yaml       # Video metadata
            โ””โ”€โ”€ source/
                โ””โ”€โ”€ transcript.txt  # Video transcript

Use Cases

  • Personal knowledge management - Organize your reading and learning
  • Research - Collect and index academic papers and resources
  • AI/LLM projects - Structured data ready for RAG systems
  • Content archiving - Preserve YouTube content with transcripts
  • Book clubs - Share organized collections with metadata

Requirements

  • Python 3.11 or higher
  • YouTube Data API key (optional, for video metadata)
  • Internet connection (for YouTube features)

Documentation

Full documentation available on GitHub:

Example Workflows

Build a Personal Library

# Initialize library
rl init ~/my-knowledge-library
cd ~/my-knowledge-library

# Add your book collection
rl book import-folder ~/Downloads/ebooks/

# Add educational videos
rl video fetch https://youtube.com/watch?v=dQw4w9WgXcQ
rl video fetch https://youtube.com/watch?v=VIDEO_ID_2

# Generate indices
rl catalog rebuild

# View your collection
rl catalog stats
rl book list
rl video list

Migrate from v0.1.0

If you have a library from version 0.1.0 with .knowledgehub/ directory:

rl catalog migrate --library /path/to/old-library

This converts your library to the new format with catalog.yaml.

Technologies Used

License

MIT License - see LICENSE for details.

Copyright (c) 2024 Kenny Wilson

Links


Made with โค๏ธ for knowledge enthusiasts and AI researchers

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

resource_librarian-0.1.2.tar.gz (107.8 kB view details)

Uploaded Source

Built Distribution

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

resource_librarian-0.1.2-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file resource_librarian-0.1.2.tar.gz.

File metadata

  • Download URL: resource_librarian-0.1.2.tar.gz
  • Upload date:
  • Size: 107.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for resource_librarian-0.1.2.tar.gz
Algorithm Hash digest
SHA256 647a8d8eecb8611a4d44fd8c8cb5960de0fd6275fefa6b02687fe099d82f8dec
MD5 d7933a8c1412d23ffe107a50d3fe032b
BLAKE2b-256 6b0223f1bd0a6bf3d2a91eb84ab39c1b37e6ab32014937ca7c80fe5a1ede8911

See more details on using hashes here.

Provenance

The following attestation bundles were made for resource_librarian-0.1.2.tar.gz:

Publisher: publish.yml on kennyrnwilson/resource-librarian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file resource_librarian-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for resource_librarian-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8508627b97e35a24508b0cbe80938f3b512254bce5cdaf5c822409b8fad8ad87
MD5 a65d2e4052ad8dba9e094b7a02db09ec
BLAKE2b-256 6d65869a7d461253645f2e8ff2d6889210156a090706f4aaabf719b00b32eec0

See more details on using hashes here.

Provenance

The following attestation bundles were made for resource_librarian-0.1.2-py3-none-any.whl:

Publisher: publish.yml on kennyrnwilson/resource-librarian

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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