Skip to content

Commit

Permalink
add support for mobi in makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
ofou committed May 20, 2021
1 parent a691f60 commit ddeee99
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions Makefile
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..."
Expand All @@ -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... "
Expand All @@ -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."

0 comments on commit ddeee99

Please sign in to comment.