basic script for html->pdf conversion
This commit is contained in:
parent
06f3457efa
commit
b51a667d56
1 changed files with 19 additions and 0 deletions
19
printable.rb
Normal file
19
printable.rb
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/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 # dokuwiki pagenme/basename 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}/templates/fieldguide.tex --include-in-header=#{repo}/header.tex --latex-engine=xelatex -o #{repo}/print/#{file}.pdf`
|
Loading…
Reference in a new issue