Metadata-Version: 2.4
Name: blogpack
Version: 0.1.2
Summary: Download entire blogs for offline reading with working internal links
Project-URL: Homepage, https://github.com/timf34/blogpack
Project-URL: Repository, https://github.com/timf34/blogpack
Author: Tim Farrelly
License-Expression: GPL-3.0-only
License-File: LICENSE
Keywords: archive,blog,epub,ghost,offline,pdf,substack,wordpress
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Python: >=3.10
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: ebooklib>=0.18
Requires-Dist: httpx>=0.25.0
Requires-Dist: lxml>=4.9.0
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.9.0
Requires-Dist: weasyprint>=60.0
Description-Content-Type: text/markdown

# Blogpack

Download entire blogs for offline reading. Generates PDF, EPUB, and HTML with working internal links.

## Features

- Downloads all posts from a blog
- Preserves internal links between posts
- Downloads and embeds images
- Multiple output formats: EPUB (e-readers), HTML (browsers), PDF
- Supports Ghost, Substack, and WordPress blogs

## Installation

```bash
pip install blogpack
```

**Note:** PDF export requires additional system libraries. If PDF generation fails:
- Ubuntu/Debian: `sudo apt install libpango-1.0-0 libpangocairo-1.0-0`
- macOS: `brew install pango`
- Windows: Install GTK3 from MSYS2

EPUB and HTML exports work without these dependencies.

## CLI Usage

```bash
# Download a blog (saves to ./cold-takes/ by default)
blogpack https://www.cold-takes.com/

# Specify output directory
blogpack https://www.cold-takes.com/ -o ./my-folder

# Generate only EPUB
blogpack https://www.cold-takes.com/ -f epub

# Limit to 50 posts
blogpack https://www.cold-takes.com/ -n 50

# Skip images for faster download
blogpack https://www.cold-takes.com/ --no-images

# Disable SSL verification (for sites with certificate issues)
blogpack https://example.com/ --no-verify-ssl
```

## Web App

A browser-based interface is included in `blogpack-web/`.

### Run Locally

```bash
cd blogpack-web
pip install -r requirements.txt
uvicorn app:app --reload
# Open http://localhost:8000
```

### Deploy with Docker

```bash
docker build -t blogpack-web .
docker run -p 8000:8000 blogpack-web
```

## Output Structure

```
output/
├── html/
│   ├── index.html           # Table of contents
│   ├── post-slug.html       # Individual posts
│   └── images/              # Downloaded images
├── blog-archive.epub        # For e-readers
└── blog-archive.pdf         # Single PDF
```

## Supported Platforms

| Platform | Status |
|----------|--------|
| Ghost | Supported |
| Substack | Supported |
| WordPress | Supported |

## Documentation

See [CLAUDE.md](CLAUDE.md) for detailed codebase documentation.

## License

GPL-3.0 - See [LICENSE](LICENSE) for details.

## Links

- GitHub: https://github.com/timf34/blogpack
- PyPI: https://pypi.org/project/blogpack/
