diff --git a/print/hosting_conversations.pdf b/print/hosting_conversations.pdf index 85db2bb..7890a62 100644 Binary files a/print/hosting_conversations.pdf and b/print/hosting_conversations.pdf differ diff --git a/printable.rb b/printable.rb index 06aa7e1..21cbce9 100644 --- a/printable.rb +++ b/printable.rb @@ -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