Slide 1

Slide 1 text

Installing and Running decksh/pdfdeck

Slide 2

Slide 2 text

Installing

Slide 3

Slide 3 text

Installing using go and git $ go install github.com/ajstarks/decksh/cmd/decksh@latest Install the latest version of decksh $ go install github.com/ajstarks/deck/cmd/pdfdeck@latest Install the latest version of pdfdeck $ git clone https://github.com/ajstarks/deckfonts $HOME/deckfonts Install fonts into $HOME/deckfonts $ decksh -help $ pdfdeck -help Do a test run of decksh and pdfdeck

Slide 4

Slide 4 text

Installing decksh and pdfdeck binaries https://github.com/ajstarks/decksh/tree/master/cmd/decksh/binaries https://github.com/ajstarks/deck/tree/master/cmd/pdfdeck/binaries Pick your type, download, rename to 'decksh', place where your apps live. Pick your type, download, rename to 'pdfdeck', place where your apps live.

Slide 5

Slide 5 text

Downloading the fonts Download, unzip to your home directory.

Slide 6

Slide 6 text

Fonts Catalog

Slide 7

Slide 7 text

Default Fonts Times times timesi timesi timesb timesbi Helvetica helvetica helveticai helveticab helveticabi Courier courier courieri courierb courierbi

Slide 8

Slide 8 text

Alternative serif, sans, mono Charter Charter-Regular Charter-Italic Fira Sans FiraSans-Book FiraSans-Medium FiraSans-Regular Inconsolata Inconsolata-Regular Inconsolata-Bold Inconsolata-Medium Inconsolata-Condensed

Slide 9

Slide 9 text

Symbol fonts Zapf Dingbats zapfdingbats Gophers gophers State Face stateface Wee People weepeople

Slide 10

Slide 10 text

Running

Slide 11

Slide 11 text

Workflow think command render edit/save

Slide 12

Slide 12 text

Working setup decksh code commands output edit/save execute render editor terminal viewer

Slide 13

Slide 13 text

VSCode: Editor for Mac, Windows, and Linux decksh code with syntax highlighting Integrated terminal Status showing decksh mode

Slide 14

Slide 14 text

Mac: Preview Windows: Sumatra PDF Linux: mupdf PDF Readers

Slide 15

Slide 15 text

Mac OS editor: VSCode terminal: VSCode viewer: Preview

Slide 16

Slide 16 text

Windows editor: VSCode terminal: VSCode viewer: Sumatra PDF

Slide 17

Slide 17 text

Linux editor: VSCode terminal: VSCode viewer: mupdf

Slide 18

Slide 18 text

Render

Slide 19

Slide 19 text

Update

Slide 20

Slide 20 text

no grid -grid 5 Using the -grid option

Slide 21

Slide 21 text

VSCode setup copy this to your settings "editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "keyword.other.command.decksh", "settings": { "foreground": "#AA0000" } }, ... } copy to .vscode/extensions/ajstarks.decksh-1.0.0 https://github.com/ajstarks/decksh/tree/master/vscode

Slide 22

Slide 22 text

vim setup copy to .vim https://github.com/ajstarks/decksh/tree/master/vim

Slide 23

Slide 23 text

Sublime Text setup copy to dsh.sublime-build and dsh.sublime-syntax to Sublime user package directory, copy dpdfr to your PATH https://github.com/ajstarks/decksh/tree/master/sublime-text CTRL-B to build and display

Slide 24

Slide 24 text

The command line

Slide 25

Slide 25 text

decksh command usage decksh example.dsh | pdfdeck ... decksh decksh in.dsh decksh -o out.xml decksh -o out.xml in.dsh decksh -version decksh -var name=value ... decksh -dump ... read from stdin, write to stdout read from file, write to stdout read from stdin, write to file read from file, write to file show version assign a variable dump assignments

Slide 26

Slide 26 text

pdfdeck [options] inputfile Option -sans -serif -mono -symbol -pages -layers -grid -pagesize -fontdir -outdir -stdout -author -title Default helvetica times courier zapfdingbats 1-1000000 image:rect:ellipse:curve:arc:line:poly:text:list 0 Letter $HOME/deckfonts Current directory false "" "" Description Sans Serif font Serif font Monospace font Symbol font Pages to output (first-last) Drawing order Draw a grid at specified % (0 for no grid) Page size (w,h or Legal, Tabloid, A[3-5], ArchA, 4R, Index) Font directory Output directory Output to standard output Document author Document title

Slide 27

Slide 27 text

command examples decksh -o file.xml file.dsh; pdfdeck file.xml process file.dsh to file.xml to file.pdf decksh file.dsh | pdfdeck -stdout - > output.pdf Pipe the output from decksh, making output.pdf pdfdeck -pagesize 1920,1080 -pages 10-20 -grid 5 file.xml render pages 10-20 to file.pdf, page size of 1920 (width) x 1080 (height) pixels, on a 5% grid pdfdeck -sans FiraSans-Regular -serif Charter-Regular -mono Inconsolata-Bold file.xml use FiraSans-Regular.ttf, Charter-Regular.ttf, and Inconsolata-Bold.ttf from the deckfonts directory echo file.dsh|entr -s 'decksh file.dsh|pdfdeck -stdout - > f.pdf; pkill -HUP mupdf' When file.dsh changes, make f.pdf, and refresh the viewer