hosting_conversations
This commit is contained in:
parent
0e72d7abe8
commit
e2520443dd
2 changed files with 19 additions and 7 deletions
Binary file not shown.
26
printable.rb
26
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue