19 lines
601 B
Ruby
19 lines
601 B
Ruby
#!/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 -S --template=#{repo}/pandoc/templates/fieldguide.tex --include-in-header=#{repo}/pandoc/header.tex --latex-engine=xelatex -o #{repo}/print/#{file}.pdf`
|