Merge branch 'master' of ssh://fo.am/foam/futurist-fieldguide

This commit is contained in:
nik gaffney 2015-06-02 22:48:57 +02:00
commit 34f8dac69a
2 changed files with 19 additions and 7 deletions

Binary file not shown.

View file

@ -2,13 +2,24 @@
#
# dokuwiki -> pdf conversion for futurist fieldguide
require "slop"
opts = Slop.parse do
banner 'Usage: printable.rb [options]'
on 'file=', 'source file basename'
on 'v', 'verbose', 'enable verbose mode'
on '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"
# Dir['*.txt']
#file=ARGV[0] # dokuwiki pagenme as argument (no opts)
file=ARGV[0] # dokuwiki pagenme as argument
file = opts[:file]
puts file
# parse dokuwiki -> html
`php /var/www/libarynth/dokuwiki/bin/dokucli.php < #{doku}/#{file}.txt > /tmp/#{file}.html`
@ -29,9 +40,10 @@ file=ARGV[0] # dokuwiki pagenme as argument
# - 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
`git add -A`
`git commit -m "#{file}"`
`git pull --commit`
`git push`
if opts.git?
`git add -A`
`git commit -m "#{file}"`
`git pull --commit`
`git push`
end