Metadata-Version: 2.4
Name: blogpack
Version: 0.1.4
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

*Blog → Book!*

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

Absolutely ideal for long flights, distraction free reading, digital detoxes, or pretending you'll finally catch up on that Substack.

Works with Substack, Ghost 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.

## Usage

```bash
blogpack https://www.cold-takes.com/
```

Downloads the blog to `./cold-takes/` with HTML, EPUB, and PDF formats.

### Options

```bash
blogpack https://example.com/ -o ./my-folder   # Custom output directory
blogpack https://example.com/ -f epub          # Only generate EPUB
blogpack https://example.com/ -n 50            # Limit to 50 posts
blogpack https://example.com/ --no-images      # Skip images
blogpack https://example.com/ --no-verify-ssl  # Disable SSL verification
```

## 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

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

## License

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