#!/usr/bin/env fish

set theme themes/medium.css

# get title
set title (readable $argv --properties "title")

echo "title: " $title

# pulldown html page
readable $argv --output originals/$title.html 

pandoc --self-contained -f html -t html -c $theme -o reader/$title.html originals/$title.html

pandoc -f html -t markdown_github-raw_html -o markdown/$title.md originals/$title.html

pandoc -f html -t epub -o epubs/$title.epub originals/$title.html
