Skip to content

Given a Substack newsletter, save the contents into an sqlite db and format it as an epub

Notifications You must be signed in to change notification settings

sfingali/sub2epub

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Substack to EPUB Converter

This project is a Python script that converts a Substack newsletter archive into an EPUB file. The script fetches articles from a Substack publication, converts them into HTML chapters, and compiles them into an EPUB file. It uses the Substack API and requires a valid session cookie to retrieve content.

Features

  • Fetches articles from any Substack newsletter.
  • Converts each article into an HTML-based chapter.
  • Creates a fully formatted EPUB with metadata including author and newsletter name.
  • Handles pagination to ensure all available articles are included.

Requirements

  • Python 3.8+
  • SQLite3 (for storing fetched article metadata)
  • Git (optional, if you're managing the repository)

Python Dependencies:

You can install the necessary dependencies using pip:

pip install -r requirements.txt

About

Given a Substack newsletter, save the contents into an sqlite db and format it as an epub

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%