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.
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:
- GitHub Repository - Source code and issues
- Getting Started Guide - Developer setup
- Architecture - System design
- Dependencies - Package choices
- Parsing Details - Document parsing
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
- CLI: Typer for command-line interface
- Output: Rich for beautiful terminal output
- Data: Pydantic for data validation
- Parsing: PyMuPDF for PDFs, ebooklib for EPUB
- YouTube: google-api-python-client for metadata, youtube-transcript-api for transcripts
License
MIT License - see LICENSE for details.
Copyright (c) 2024 Kenny Wilson
Links
- PyPI: https://pypi.org/project/resource-librarian/
- GitHub: https://github.com/kennyrnwilson/resource-librarian
- Issues: https://github.com/kennyrnwilson/resource-librarian/issues
- Documentation: https://github.com/kennyrnwilson/resource-librarian/tree/main/docs
Made with โค๏ธ for knowledge enthusiasts and AI researchers
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
647a8d8eecb8611a4d44fd8c8cb5960de0fd6275fefa6b02687fe099d82f8dec
|
|
| MD5 |
d7933a8c1412d23ffe107a50d3fe032b
|
|
| BLAKE2b-256 |
6b0223f1bd0a6bf3d2a91eb84ab39c1b37e6ab32014937ca7c80fe5a1ede8911
|
Provenance
The following attestation bundles were made for resource_librarian-0.1.2.tar.gz:
Publisher:
publish.yml on kennyrnwilson/resource-librarian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
resource_librarian-0.1.2.tar.gz -
Subject digest:
647a8d8eecb8611a4d44fd8c8cb5960de0fd6275fefa6b02687fe099d82f8dec - Sigstore transparency entry: 731985440
- Sigstore integration time:
-
Permalink:
kennyrnwilson/resource-librarian@482cb00e3c73030632411cf4e41f58c3faff94b9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kennyrnwilson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@482cb00e3c73030632411cf4e41f58c3faff94b9 -
Trigger Event:
release
-
Statement type:
File details
Details for the file resource_librarian-0.1.2-py3-none-any.whl.
File metadata
- Download URL: resource_librarian-0.1.2-py3-none-any.whl
- Upload date:
- Size: 47.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8508627b97e35a24508b0cbe80938f3b512254bce5cdaf5c822409b8fad8ad87
|
|
| MD5 |
a65d2e4052ad8dba9e094b7a02db09ec
|
|
| BLAKE2b-256 |
6d65869a7d461253645f2e8ff2d6889210156a090706f4aaabf719b00b32eec0
|
Provenance
The following attestation bundles were made for resource_librarian-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on kennyrnwilson/resource-librarian
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
resource_librarian-0.1.2-py3-none-any.whl -
Subject digest:
8508627b97e35a24508b0cbe80938f3b512254bce5cdaf5c822409b8fad8ad87 - Sigstore transparency entry: 731985444
- Sigstore integration time:
-
Permalink:
kennyrnwilson/resource-librarian@482cb00e3c73030632411cf4e41f58c3faff94b9 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/kennyrnwilson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@482cb00e3c73030632411cf4e41f58c3faff94b9 -
Trigger Event:
release
-
Statement type: