From ff440c490aab5f115ac563dc502a5551f28b1e9a Mon Sep 17 00:00:00 2001 From: nik gaffney Date: Tue, 4 Aug 2015 13:54:27 +0200 Subject: [PATCH] =?UTF-8?q?-=20=E2=80=98doku2tex.rb~=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- doku2tex.rb~ | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 doku2tex.rb~ diff --git a/doku2tex.rb~ b/doku2tex.rb~ deleted file mode 100644 index 7ed1539..0000000 --- a/doku2tex.rb~ +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/local/bin/ruby -# -# dokuwiki -> pdf conversion for futurist fieldguide - -require "slop" - -opts = Slop.parse do |o| - o.string '-f','--file', 'source file basename' - o.bool '-v', '--verbose', 'enable verbose mode' - o.bool '-g', '--git', 'commit new files to git repo' -end - -repo="/home/nik/pandoc/futurist-fieldguide/" -doku="/var/www/libarynth/dokuwiki/data/pages/futurist_fieldguide/" -user="www-data" - -#file=ARGV[0] # dokuwiki pagenme as argument (no opts) - -file = opts[:file] - -puts file - -# parse dokuwiki -> html -`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 \ - --metadata=title-meta:#{file} \ - --latex-engine=xelatex -o #{repo}/print/#{file}.pdf` - -# merge single pdfs with 'assemble.rb' - -# gittery -# - assuming the script is run in #{repo} and has origin ssh://git@repo.fo.am:foam/futurist-fieldguide.git -# - otherwise perhaps https://github.com/schacon/ruby-git - -if opts.git? - `git add -A` - `git commit -m "#{file}"` - `git pull --commit` - `git push` -end -