futurist-fieldguide/printable.rb

20 lines
587 B
Ruby
Raw Normal View History

2015-05-26 17:39:55 +00:00
#!/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"
2015-05-26 17:47:24 +00:00
# Dir['*.txt']
2015-05-26 17:39:55 +00:00
2015-05-26 17:47:24 +00:00
file=ARGV[0] # dokuwiki pagenme as argument
2015-05-26 17:39:55 +00:00
# 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 -S --template=#{repo}/templates/fieldguide.tex --include-in-header=#{repo}/header.tex --latex-engine=xelatex -o #{repo}/print/#{file}.pdf`