Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

substack-stacker

Combine Substack posts into a single .docx file. All posts, stacked into one document, like a little book.

Setup

pip install -e .

Usage

# just pass a substack url or name
python stacker.py https://example.substack.com

# or just the name
python stacker.py example

# chronological order (oldest first)
python stacker.py example --oldest-first

# only grab the last 10 posts
python stacker.py example --limit 10

# custom output filename
python stacker.py example -o my_book.docx

The output is a .docx with a title page, table of contents, and each post as its own chapter with a page break in between. Images, formatting, code blocks, blockquotes are all preserved!

Options

Flag What it does
-o FILE Output filename (default: {name}_posts.docx)
--oldest-first Chronological order instead of newest first
-n N / --limit N Only fetch N posts
--delay SECS Delay between API requests (default: 1.5s)

Examples

Check the examples/ folder for a sample output.

About

substack-stacker

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages