Skip to content

Commit

Permalink
stashing changes on PDF implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Flaxman committed Jan 18, 2021
1 parent af9552a commit 23626e6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 15 deletions.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ $ bundle exec jekyll serve

Then visit: <http://127.0.0.1:4000>

## Spellcheck

To spell check (takes ~3s):
```bash
$ pyspelling -c .spellcheck.yml
Expand All @@ -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))
13 changes: 12 additions & 1 deletion create_ebook.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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
13 changes: 12 additions & 1 deletion create_pdf.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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

# 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
8 changes: 5 additions & 3 deletions index_pandoc.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 23626e6

Please sign in to comment.