Name | hamel-tools JSON |
Version |
0.2.0
JSON |
| download |
home_page | None |
Summary | CLI tools for YouTube transcripts, chapters, and annotated talks |
upload_time | 2025-07-11 21:52:05 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# hamel_tools
CLI tools that wrap the [hamel](https://github.com/hamelsmu/hamel) Python library for working with YouTube videos and generating content.
## Installation
```bash
# Install in development mode
pip install -e .
# Or using the Makefile
make install-dev
```
This installs three CLI commands:
- `ai-transcribe` - Download YouTube transcripts
- `ai-chapters` - Generate YouTube chapter summaries
- `ai-annotate-talk` - Create annotated blog posts from technical talks
## Usage
### Transcript Tool
```bash
# 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
```bash
# Generate chapters (requires GEMINI_API_KEY)
export GEMINI_API_KEY="your-api-key"
ai-chapters "https://youtu.be/VIDEO_ID"
```
### Annotated Talk Generator
```bash
# 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:
```bash
# macOS
brew install poppler
# Ubuntu/Debian
apt-get install poppler-utils
```
## Development
### Running Tests
```bash
./test.sh
```
### Version Management
The Makefile includes version bump commands that update both `pyproject.toml` and `__init__.py`:
```bash
# 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
1. Install publishing tools:
```bash
make install-publish-tools
```
2. Configure twine (see `.pypirc.example`):
```bash
cp .pypirc.example ~/.pypirc
# Edit ~/.pypirc with your PyPI tokens
```
#### Release Workflow
```bash
# 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 upload
- `make test-upload` - Tests on TestPyPI first
- `make 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "hamel-tools",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Hamel Husain <hamel.husain@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f2/fd/8cdb5db7df96c3f801103979ec226fb685882bd0c649bca63ed5c10f5db1/hamel_tools-0.2.0.tar.gz",
"platform": null,
"description": "# hamel_tools\n\nCLI tools that wrap the [hamel](https://github.com/hamelsmu/hamel) Python library for working with YouTube videos and generating content.\n\n## Installation\n\n```bash\n# Install in development mode\npip install -e .\n\n# Or using the Makefile\nmake install-dev\n```\n\nThis installs three CLI commands:\n- `ai-transcribe` - Download YouTube transcripts \n- `ai-chapters` - Generate YouTube chapter summaries\n- `ai-annotate-talk` - Create annotated blog posts from technical talks\n\n## Usage\n\n### Transcript Tool\n```bash\n# Download transcript with timestamps\nai-transcribe \"https://youtu.be/VIDEO_ID\"\n\n# Use seconds-only timestamps\nai-transcribe \"https://youtu.be/VIDEO_ID\" --seconds\n\n# Save to file\nai-transcribe \"https://youtu.be/VIDEO_ID\" > transcript.txt\n```\n\n### Chapter Generator\n```bash\n# Generate chapters (requires GEMINI_API_KEY)\nexport GEMINI_API_KEY=\"your-api-key\"\nai-chapters \"https://youtu.be/VIDEO_ID\"\n```\n\n### Annotated Talk Generator\n```bash\n# Generate annotated blog post (requires both API keys)\nexport GEMINI_API_KEY=\"your-api-key\"\nexport JINA_READER_KEY=\"your-api-key\"\n\n# Basic usage\nai-annotate-talk \"https://youtu.be/VIDEO_ID\" slides.pdf output_images/\n\n# With custom transcript\nai-annotate-talk \"https://youtu.be/VIDEO_ID\" slides.pdf output_images/ --transcript transcript.txt\n\n# Save to file\nai-annotate-talk \"https://youtu.be/VIDEO_ID\" slides.pdf output_images/ --output post.md\n```\n\n### Prerequisites\n\nFor annotate-talk, you need poppler-utils:\n```bash\n# macOS\nbrew install poppler\n\n# Ubuntu/Debian\napt-get install poppler-utils\n```\n\n## Development\n\n### Running Tests\n```bash\n./test.sh\n```\n\n### Version Management\n\nThe Makefile includes version bump commands that update both `pyproject.toml` and `__init__.py`:\n\n```bash\n# Bump versions\nmake bump-patch # 0.1.0 -> 0.1.1\nmake bump-minor # 0.1.0 -> 0.2.0 \nmake bump-major # 0.1.0 -> 1.0.0\n\n# Create a release (bump + git tag)\nmake release-patch # Bumps patch and tags\nmake release-minor # Bumps minor and tags\nmake release-major # Bumps major and tags\n```\n\n### Publishing to PyPI\n\n#### Setup\n1. Install publishing tools:\n ```bash\n make install-publish-tools\n ```\n\n2. Configure twine (see `.pypirc.example`):\n ```bash\n cp .pypirc.example ~/.pypirc\n # Edit ~/.pypirc with your PyPI tokens\n ```\n\n#### Release Workflow\n```bash\n# 1. Create a release\nmake release-minor # or release-patch, release-major\n\n# 2. Push to GitHub\ngit push && git push --tags\n\n# 3. Build and check\nmake check\n\n# 4. Upload to PyPI\nmake test-upload # Test first\nmake upload # Then production\n```\n\nThe Makefile uses twine for secure uploads and includes:\n- `make check` - Validates distributions before upload\n- `make test-upload` - Tests on TestPyPI first\n- `make upload` - Publishes to PyPI with confirmation prompt\n\n## Architecture\n\nEach tool is implemented as a Typer CLI application that wraps functionality from the hamel library:\n\n- `transcribe.py` \u2192 `hamel.yt.transcribe()`\n- `chapters.py` \u2192 `hamel.yt.yt_chapters()` \n- `annotate_talk.py` \u2192 `hamel.writing.generate_annotated_talk_post()`\n\nThe tools follow a consistent pattern using Typer's app decorator approach without `if __name__ == \"__main__\"` blocks.",
"bugtrack_url": null,
"license": "MIT",
"summary": "CLI tools for YouTube transcripts, chapters, and annotated talks",
"version": "0.2.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "25f220c335fdf9541427c7d0f97547e5ee71288664794ce7f02cfde1568b23d0",
"md5": "bb15d5f78c78e6b7f12d5ca13d5cc1d0",
"sha256": "6fc93bb7ea3d1e25e7ff392cbd61c8cd6b7acaebe015346e757227091acc0f8b"
},
"downloads": -1,
"filename": "hamel_tools-0.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "bb15d5f78c78e6b7f12d5ca13d5cc1d0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 4964,
"upload_time": "2025-07-11T21:52:04",
"upload_time_iso_8601": "2025-07-11T21:52:04.494026Z",
"url": "https://files.pythonhosted.org/packages/25/f2/20c335fdf9541427c7d0f97547e5ee71288664794ce7f02cfde1568b23d0/hamel_tools-0.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f2fd8cdb5db7df96c3f801103979ec226fb685882bd0c649bca63ed5c10f5db1",
"md5": "353cdd5214b931175382d88b78cc5392",
"sha256": "16f3475bf4f0786246b37000db789eb972ebfef6e570eef8b494a0b08df69952"
},
"downloads": -1,
"filename": "hamel_tools-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "353cdd5214b931175382d88b78cc5392",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 4524,
"upload_time": "2025-07-11T21:52:05",
"upload_time_iso_8601": "2025-07-11T21:52:05.523970Z",
"url": "https://files.pythonhosted.org/packages/f2/fd/8cdb5db7df96c3f801103979ec226fb685882bd0c649bca63ed5c10f5db1/hamel_tools-0.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 21:52:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "hamel-tools"
}