CLI tools for YouTube transcripts, chapters, and annotated talks
Project description
hamel_tools
CLI tools that wrap the hamel Python library for working with YouTube videos and generating content.
Installation
# Install in development mode
pip install -e .
# Or using the Makefile
make install-dev
This installs three CLI commands:
ai-transcribe- Download YouTube transcriptsai-chapters- Generate YouTube chapter summariesai-annotate-talk- Create annotated blog posts from technical talks
Usage
Transcript Tool
# Download transcript with timestamps
ai-transcribe "https://youtu.be/VIDEO_ID"
# Use seconds-only timestamps
ai-transcribe "https://youtu.be/VIDEO_ID" --seconds
# Save to file
ai-transcribe "https://youtu.be/VIDEO_ID" > transcript.txt
Chapter Generator
# Generate chapters (requires GEMINI_API_KEY)
export GEMINI_API_KEY="your-api-key"
ai-chapters "https://youtu.be/VIDEO_ID"
Annotated Talk Generator
# Generate annotated blog post (requires both API keys)
export GEMINI_API_KEY="your-api-key"
export JINA_READER_KEY="your-api-key"
# Basic usage
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/
# With custom transcript
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/ --transcript transcript.txt
# Save to file
ai-annotate-talk "https://youtu.be/VIDEO_ID" slides.pdf output_images/ --output post.md
Prerequisites
For annotate-talk, you need poppler-utils:
# macOS
brew install poppler
# Ubuntu/Debian
apt-get install poppler-utils
Development
Running Tests
./test.sh
Version Management
The Makefile includes version bump commands that update both pyproject.toml and __init__.py:
# Bump versions
make bump-patch # 0.1.0 -> 0.1.1
make bump-minor # 0.1.0 -> 0.2.0
make bump-major # 0.1.0 -> 1.0.0
# Create a release (bump + git tag)
make release-patch # Bumps patch and tags
make release-minor # Bumps minor and tags
make release-major # Bumps major and tags
Publishing to PyPI
Setup
-
Install publishing tools:
make install-publish-tools -
Configure twine (see
.pypirc.example):cp .pypirc.example ~/.pypirc # Edit ~/.pypirc with your PyPI tokens
Release Workflow
# 1. Create a release
make release-minor # or release-patch, release-major
# 2. Push to GitHub
git push && git push --tags
# 3. Build and check
make check
# 4. Upload to PyPI
make test-upload # Test first
make upload # Then production
The Makefile uses twine for secure uploads and includes:
make check- Validates distributions before uploadmake test-upload- Tests on TestPyPI firstmake upload- Publishes to PyPI with confirmation prompt
Architecture
Each tool is implemented as a Typer CLI application that wraps functionality from the hamel library:
transcribe.py→hamel.yt.transcribe()chapters.py→hamel.yt.yt_chapters()annotate_talk.py→hamel.writing.generate_annotated_talk_post()
The tools follow a consistent pattern using Typer's app decorator approach without if __name__ == "__main__" blocks.
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 hamel_tools-0.1.1.tar.gz.
File metadata
- Download URL: hamel_tools-0.1.1.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26c49ef9dbc6a47b6120d06b574a30daf77cd30734b83790714c5c0a20c1d77e
|
|
| MD5 |
7010849fe56b7545ab13ab20c21329ed
|
|
| BLAKE2b-256 |
2ad3efd3640c933180bad2b86a337a58dd8964147ad9530db0465cb98640fa2c
|
File details
Details for the file hamel_tools-0.1.1-py3-none-any.whl.
File metadata
- Download URL: hamel_tools-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
480e1a6baab2f7b3dcfe92c9d7ea83661852d149e1c530f48c672b197a917947
|
|
| MD5 |
ad3ddd4bf9e6af7473f0c59265e51ab5
|
|
| BLAKE2b-256 |
48012b3419fcef10f9ede92ca8d0d65c940b4665ff763188df2c17d353e44712
|