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

Contributing

Contributions are welcome! Please visit our GitHub repository to:

  • Report bugs
  • Request features
  • Submit pull requests
  • Read contribution guidelines

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.1.tar.gz (107.9 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.1-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: resource_librarian-0.1.1.tar.gz
  • Upload date:
  • Size: 107.9 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.1.tar.gz
Algorithm Hash digest
SHA256 d8aa57f54839e4c1a296a7ca7c7df5895f70b9422da75add68a8a8930d7b75d9
MD5 b56666e9b657cefce4b99a6a23826eb0
BLAKE2b-256 6b4e64b9b5f2ffc420c16f7911e66271adc92a4f31fe474af4d6589d51643da1

See more details on using hashes here.

Provenance

The following attestation bundles were made for resource_librarian-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for resource_librarian-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0aa9f2e1f7f5dfb2d041c514bab0f7b49e3be87b60665b127e2302aa3c086a10
MD5 3f18198ba9049f02aa7c3c3ccee714bc
BLAKE2b-256 6dc12671eec225b03821d2534fd93401bfee286b628b95a947d1611e18baf17b

See more details on using hashes here.

Provenance

The following attestation bundles were made for resource_librarian-0.1.1-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