-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
SHELL := /bin/bash | ||
|
||
.SILENT: clean venv fetch merge epub words count | ||
.SILENT: dependencies clean venv fetch merge epub words count mobi | ||
|
||
all: clean venv fetch merge epub | ||
all: clean venv fetch merge epub mobi | ||
|
||
clean: | ||
@echo "🗑 Cleaning up the room..." | ||
|
@@ -18,14 +18,15 @@ count: | |
venv: | ||
@echo "🐍 Creating a safe place for a Python... " | ||
mkdir essays | ||
python3.8 -m venv .venv | ||
python3.9 -m venv .venv | ||
source ".venv/bin/activate" | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
|
||
dependencies: # for MacOS | ||
brew install python3 | ||
brew install [email protected] | ||
brew install --build-from-source pandoc | ||
brew install --cask calibre | ||
|
||
fetch: | ||
@echo "🧠 Downloading Paul Graham mind... " | ||
|
@@ -36,3 +37,9 @@ epub: | |
@echo "📒 Binding the 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 the MOBI... " | ||
ebook-convert graham.epub graham.mobi | ||
@echo "🎉 MOBI file created." |