• Stars
    star
    350
  • Rank 118,626 (Top 3 %)
  • Language
    Python
  • Created over 3 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📚 Download the full collection of Paul Graham essays in EPUB, Kindle & Markdown for easy reading.

Graham Essays Collection

CI Ubuntu

https://startupquote.com/post/3890222281

"If you are not embarrassed by the first version of your product, you've launched too late".


Check out the releases page for the latest build, updated daily.

Download the complete collection of +200 essays from Paul Graham website and export them in EPUB, MOBI and Markdown for easy AFK reading. It turned out to be a whooping +500k words. I used the RSS originally made by Aaron Swartz shared by PG himself, feedparser, html2text, htmldate and Unidecode libraries for data cleaning and acquisition.

Dependencies for MacOS

To create the EPUB/MOBI files you should have installed python3, pandoc and calibre for Kindle readers.

brew install python@3
brew install --build-from-source pandoc
brew install --cask calibre

Usage

Run the Makefile in the root directory using make all.

graham-essays/Makefile

Lines 5 to 45 in 80249f9

all: clean venv fetch merge epub mobi
clean:
@echo "🗑 Cleaning up the room..."
rm -rf essays .venv graham.epub graham.md ; true
merge:
@echo "🌪 Merging articles..."
pandoc essays/*.md -o graham.md -f markdown_strict
count:
wc -w essays/* | sort -n
venv:
@echo "🐍 Creating a safe place for a Python... "
mkdir essays
python3 -m venv .venv
source "./.venv/bin/activate"
pip3 install --upgrade pip
pip3 install -r requirements.txt
dependencies: # for MacOS
brew install python@3
brew install --build-from-source pandoc
brew install --cask calibre
fetch:
@echo "🧠 Downloading Paul Graham mind... "
python3 graham.py
epub:
${merge}
@echo "📒 Binding EPUB... "
pandoc essays/*.md -o graham.epub -f markdown_strict --metadata-file=metadata.yaml --toc --toc-depth=1 --epub-cover-image=cover.png
@echo "🎉 EPUB file created."
mobi:
${epub}
@echo "📒 Binding MOBI... "
ebook-convert graham.epub graham.mobi
@echo "🎉 MOBI file created."

Current Essays

Here's a list of the current essays included.


If you have any ideas, suggestions, curses or feedback in order to improve the code, please don't hesitate in opening an issue or PR. They'll be very welcomed!