From 23626e6234af99d678eeb99ac4548dff14bcad7c Mon Sep 17 00:00:00 2001 From: Michael Flaxman Date: Mon, 18 Jan 2021 17:22:05 -0600 Subject: [PATCH] stashing changes on PDF implementation --- README.md | 30 ++++++++++++++++++++---------- create_ebook.sh | 13 ++++++++++++- create_pdf.sh | 13 ++++++++++++- index_pandoc.md | 8 +++++--- 4 files changed, 49 insertions(+), 15 deletions(-) mode change 100644 => 100755 create_ebook.sh mode change 100644 => 100755 create_pdf.sh diff --git a/README.md b/README.md index f3bba94..a5e8f45 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,8 @@ $ bundle exec jekyll serve Then visit: +## Spellcheck + To spell check (takes ~3s): ```bash $ pyspelling -c .spellcheck.yml @@ -19,24 +21,32 @@ Spelling check passed :) Notes: * See `.wordlist.txt` for all the exception words. -* `$ brew install aspell && pip install pyspelling` are needed. +* `$ brew install aspell && pip install pyspelling` (macOS) are needed. ## Create pdf/epub/mobi -1. Install [latex](https://www.latex-project.org/get/) -1. Install [pandoc](https://pandoc.org/installing.html) +#### Install Dependencies -1. Build the documents with +We'll be using [latex](https://www.latex-project.org/get/) and [pandoc](https://pandoc.org/installing.html) +macOS: +```bash +$ brew install pandoc +$ brew cask install mactex +``` +TODO: add windows & linux instructions +#### Build the Docs +macOS (shoudl work on linux, too): +```bash +$ create_pdf.sh +$ create_ebook.sh ``` + +Windows: +```bash create_pdf.bat create_ebook.bat ``` -or -``` -create_pdf.sh -create_ebook.sh -``` -1. The mobi file can be created from the epub file using [kindle previewer](https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1003018611) +(the mobi file can be created from the epub file using [kindle previewer](https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1003018611)) diff --git a/create_ebook.sh b/create_ebook.sh old mode 100644 new mode 100755 index 2a37889..8200125 --- a/create_ebook.sh +++ b/create_ebook.sh @@ -1,2 +1,13 @@ #!/bin/bash -pandoc --css assets/templates/epub.css --highlight-style zenburn --toc -N --lua-filter _pandoc_filter/image_link.lua --lua-filter _pandoc_filter/add_title.lua -o assets/btcguide.epub index_pandoc.md + +# Verbose printing +set -o xtrace + +pandoc --css assets/templates/epub.css --highlight-style zenburn --toc -N --lua-filter _pandoc_filter/image_link.lua --lua-filter _pandoc_filter/add_title.lua -o assets/btcguide.epub index_pandoc.md + +# Hackey timer +# https://askubuntu.com/questions/1028924/how-do-i-use-seconds-inside-a-bash-script +hrs=$(( SECONDS/3600 )) +mins=$(( (SECONDS-hrs*3600)/60)) +secs=$(( SECONDS-hrs*3600-mins*60 )) +printf 'Time spent: %02d:%02d:%02d\n' $hrs $mins $secs diff --git a/create_pdf.sh b/create_pdf.sh old mode 100644 new mode 100755 index 53d200a..419c686 --- a/create_pdf.sh +++ b/create_pdf.sh @@ -1,2 +1,13 @@ #!/bin/bash -pandoc --pdf-engine=xelatex --template=assets/templates/eisvogel.latex --highlight-style zenburn --toc -N --lua-filter _pandoc_filter/image_link.lua --lua-filter _pandoc_filter/add_title.lua -o assets/btcguide.pdf index_pandoc.md \ No newline at end of file + +# Verbose printing +set -o xtrace + +pandoc --pdf-engine=xelatex --template=assets/templates/eisvogel.latex --highlight-style zenburn --toc -N --lua-filter _pandoc_filter/image_link.lua --lua-filter _pandoc_filter/add_title.lua -o assets/btcguide.pdf index_pandoc.md + +# Hackey timer +# https://askubuntu.com/questions/1028924/how-do-i-use-seconds-inside-a-bash-script +hrs=$(( SECONDS/3600 )) +mins=$(( (SECONDS-hrs*3600)/60)) +secs=$(( SECONDS-hrs*3600-mins*60 )) +printf 'Time spent: %02d:%02d:%02d\n' $hrs $mins $secs diff --git a/index_pandoc.md b/index_pandoc.md index e88c5d0..9b8a32c 100644 --- a/index_pandoc.md +++ b/index_pandoc.md @@ -30,13 +30,15 @@ This guide is currently a work in progress. While the ultimate goal is for the p ![why-multisig-advanced file](/_pages/why-multisig-advanced.md){.markdownskip_34} -![quorum file](/_pages/quorum.md){.markdown2} +![quorum file](/_pages/quorum.md){.markdown} ## Pick Quorum Advanced -![quorum-advanced file](/_pages/quorum-advanced.md){.markdownskip_23} +![quorum-advanced file](/_pages/quorum-advanced.md){.markdownskip_34} -![equipment file](/_pages/equipment.md){.markdown2_23} +![equipment file](/_pages/equipment.md){.markdown} + +## Equipment Advanced ![equipment-advanced file](/_pages/equipment-advanced.md){.markdownskip_23}