From 97e18f4e6ee80c329772970b05b6723302d6b1cb Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Wed, 27 May 2015 10:20:15 +0200 Subject: [PATCH] =?UTF-8?q?-=20=E2=80=98#printable.rb#=E2=80=99=20-=20?= =?UTF-8?q?=E2=80=98.#printable.rb=E2=80=99=20/=20=E2=80=98printable.rb?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- #printable.rb# | 22 ---------------------- .#printable.rb | 1 - printable.rb | 4 ++++ 3 files changed, 4 insertions(+), 23 deletions(-) delete mode 100644 #printable.rb# delete mode 120000 .#printable.rb diff --git a/#printable.rb# b/#printable.rb# deleted file mode 100644 index f8718f7..0000000 --- a/#printable.rb# +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/local/bin/ruby -# -# dokuwiki -> pdf conversion for futurist fieldguide - -repo="/home/nik/pandoc/futurist-fieldguide/" -doku="/var/www/libarynth/dokuwiki/data/pages/futurist_fieldguide/" -user="www-data" - -# Dir['*.txt'] - -file=ARGV[0] # dokuwiki pagenme as argument - -# parse dokuwiki -> html -`php /var/www/libarynth/dokuwiki/bin/dokucli.php < #{doku}/#{file}.txt > /tmp/#{file}.html` - -# convert html -> pdf with pandoc - -`pandoc /tmp/#{file}.html --self-contained -`pandoc /tmp/#{file}.html -S --template=#{repo}/pandoc/templates/fieldguide.tex --include-in-header=#{repo}/pandoc/header.tex --latex-engine=xelatex -o #{repo}/print/#{file}.pdf` - -# merge single pdfs with 'assemble.rb' - diff --git a/.#printable.rb b/.#printable.rb deleted file mode 120000 index f8fdb7d..0000000 --- a/.#printable.rb +++ /dev/null @@ -1 +0,0 @@ -zzk@vrt.local.322 \ No newline at end of file diff --git a/printable.rb b/printable.rb index f1396fe..db36d24 100644 --- a/printable.rb +++ b/printable.rb @@ -14,6 +14,10 @@ file=ARGV[0] # dokuwiki pagenme as argument `php /var/www/libarynth/dokuwiki/bin/dokucli.php < #{doku}/#{file}.txt > /tmp/#{file}.html` # convert html -> pdf with pandoc + +# extra html step to create self-contained (local) images +`pandoc /tmp/#{file}.html --self-contained -o /tmp/#{file}.html` + `pandoc /tmp/#{file}.html -S --template=#{repo}/pandoc/templates/fieldguide.tex --include-in-header=#{repo}/pandoc/header.tex --latex-engine=xelatex -o #{repo}/print/#{file}.pdf` # merge single pdfs with 'assemble.rb'