iandol / scrivomatic

A writing workflow using Scrivener's style system + Pandoc for output…
https://iandol.github.io/scrivomatic/
GNU General Public License v3.0
297 stars 30 forks source link

pandomatic run by hand , not in script #20

Closed luctaesch closed 6 years ago

luctaesch commented 6 years ago

(once template files are copied into the compile dir) , see #19

1/ the command runs ok by hand , but 2/ not in the compile scripts

extract of logs :

:: Running: /usr/local/bin/pandocomatic -c pandocomatic.yaml --debug Workflow.md ::: env: ruby_executable_hooks: No such file or directory :: exit status: pid 73223 exit 127

!!!---scrivomatic::runCommand() RETURN non-zero value: /usr/local/bin/pandocomatic -c pandocomatic.yaml --debug Workflow.md !!!

when run by hand it works:

: -243 ~/Desktop/workflow_mmd 01:48 $ /usr/local/bin/pandocomatic -c pandocomatic.yaml --debug Workflow.md (4) + converting Workflow.md 3 times: (3) - convert Workflow.md -> Workflow.html pandoc --standalone \ --filter=/usr/local/bin/pandoc-citeproc \ --bibliography=workflow.bib \ --csl=apa-workflow.csl (2) - convert Workflow.md -> Workflow.html pandoc --from=markdown \ --to=html5 \ --template=custom.html \ --css=custom.css \ --standalone \ --section-divs \ --self-contained \ --toc \ --toc-depth=4 \ --base-header-level=1 \ --filter=assimilateMetadata.rb \ --bibliography=workflow.bib \ --csl=apa-workflow.csl (1) - convert Workflow.md -> Workflow.docx pandoc --from=markdown \ --to=docx \ --reference-doc=custom.docx \ --filter=simplifyMetadata.rb \ --filter=prependAll.rb \ --standalone \ --bibliography=workflow.bib \ --csl=apa-workflow.csl \ --output=/Users/luc_taesch/Desktop/workflow_mmd/Workflow.docx Pandocomatic needed 1.8 seconds to convert 'Workflow.md'.

luctaesch commented 6 years ago

this is a path issue. I found that scrivomatic was copied ( not invoked) in workflow.zip, in the script field,

i changed this by a bash invocation , but it required the SOURCING OF the profile to work.

image

iandol commented 6 years ago

Hm, you mean in my sample workflow.scriv by default it does not work for you? Did you follow the instructions in the Binder item Resources > INSTRUCTIONS?

scrivomatic is designed to be run directly from Scrivener, and it works by establishing the path to make pandocomatic run from scrivener be more flexible, you shouldn't need to run pandocomatic directly, scrivomatic will do that for you...

luctaesch commented 6 years ago

My mistake. all these 3 issues were linked to a unproper path setup .
1/ I removed rvm ( to make sure no issues with rbenv, plus 2/ I had to delete an install of pandocomadic in /usr/bin/local to make sure it finds the one in shims. 3/please note that the path you use in scrivomatic put /usr/bin/local before the rbenv shims one, when a default install do the reverse . is is on purpose ?) Many thnaks anyway for the effort , quite useful tool .

iandol commented 6 years ago

Yes I assumed that if someone installed to /usr/local/bin they would want that to override a gem installed via rbenv/pip — I do know that Python can install old versions of Pandoc and this also factors into giving /usr/local/bin priority. I'll have another think about that now though...