iandol / scrivomatic

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

Scrivener workflow example fails #13

Closed KevinCoates closed 6 years ago

KevinCoates commented 6 years ago

Hi

Using your example Scrivener workflow, I'm having some problems. I've pasted the scrivener.log below. I'm afraid my knowledge of all this is very limited, so I'm not sure where to start.

From the scrivener.log, I see a couple of problems

::: The pandoc option 'reference_doc' (with value 'custom.docx') is not recognized by paru. This option is skipped.

and

::: pandoc: Error running filter authorSimplifyMetadata.rb ::: fd:3: hPutBuf: resource vanished (Broken pipe) ::: Error running pandoc => error while running:

On this second error: if I comment out the authorSimplifyMetadata.rb line in pandocomatic.yaml, I then get the same error in relation to prependall.rb. If I comment out them both, then the output files are generated with no apparent problems.

Any tips on what I'm doing wrong would be appreciated.

Kevin

=== ------------------------------------------------------ === === Scrivomatic V1.0.16 Report @ 2018-04-21 21:01:28 +0100 === === ------------------------------------------------------ === Running under Ruby 2.3.3 Working directory: /Users/kevin/Desktop/workflow_mmd ===------ Input Options: ------===

<struct Scrivomatic::OPT input="workflow", output=nil, to=nil, yaml="pandocomatic.yaml", command="pandocomatic", envpath="/Users/kevin/.rbenv/shims:/Users/kevin/anaconda3/bin:/Library/TeX/texbin:/Users/kevin/bin:/usr/local/bin", build=false, verbose=true, dry_run=false, open_log=false>

===------ Final ENV PATH: ------=== /Users/kevin/.rbenv/shims:/Users/kevin/anaconda3/bin:/Library/TeX/texbin:/Users/kevin/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin ===------ TOOL PATHS: ------=== ---pandoc: /Users/kevin/anaconda3/bin/pandoc | V: 1.19.2.1 ---pandocomatic: /usr/local/bin/pandocomatic | V: Pandocomatic version 0.2.2.1 ---ruby: /Users/kevin/.rbenv/shims/ruby | V: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin17] ---rbenv: /usr/local/bin/rbenv ---python: /Users/kevin/anaconda3/bin/python ---xelatex: /Library/TeX/texbin/xelatex

… running pandocomatic, please wait … ===------ COMMAND OUTPUT: ------=== :: Running: /usr/local/bin/pandocomatic -c pandocomatic.yaml --debug workflow ::: The pandoc option 'reference_doc' (with value 'custom.docx') is not recognized by paru. This option is skipped. ::: (4) + converting workflow 3 times: ::: (3) - convert workflow -> workflow.docx ::: pandoc --from=markdown \ ::: --to=docx \ ::: --filter=authorSimplifyMetadata.rb \ ::: --filter=prependAll.rb \ ::: --standalone \ ::: --bibliography=workflow.bib \ ::: --csl=apa-workflow.csl \ ::: --output=/Users/kevin/Desktop/workflow_mmd/workflow.docx ::: pandoc: Error running filter authorSimplifyMetadata.rb ::: fd:3: hPutBuf: resource vanished (Broken pipe) ::: Error running pandoc => error while running: ::: ::: pandoc --from=markdown \ ::: --to=docx \ ::: --filter=authorSimplifyMetadata.rb \ ::: --filter=prependAll.rb \ ::: --standalone \ ::: --bibliography=workflow.bib \ ::: --csl=apa-workflow.csl \ ::: --output=/Users/kevin/Desktop/workflow_mmd/workflow.docx ::: ::: Pandoc responded with: ::: ::: pandoc: Error running filter authorSimplifyMetadata.rb ::: fd:3: hPutBuf: resource vanished (Broken pipe) ::: :: exit status: pid 25102 exit 243

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

iandol commented 6 years ago

Hi @KevinCoates, sorry for the late reply! This is problem caused by Anaconda Python, which installs an old version of Pandoc that ends up being found first in the path:

---pandoc: /Users/kevin/anaconda3/bin/pandoc | V: 1.19.2.1

I think I fixed this already in https://github.com/iandol/scrivomatic/commit/498ea96abe6e35d8cd64e6e40cf3837f65a2d70c — which is Scrivomatic V1.0.18, and if you redownload the workflow example it should contain the new scrivomatic.

iandol commented 6 years ago

I will close this, please reopen if the newer scrivomatic still does't work...