adityam / filter

ConTeXt module to process contents of a start-stop environment through an external program
47 stars 10 forks source link

reusing cached filter output #27

Closed expilo closed 5 years ago

expilo commented 5 years ago

I would like to reuse cached output between context runs but the following still makes all the calls to pandoc every time I execute context. Is it possible to run context without calling external program defined in \defineexternalfilter and still use the external filter output from previous runs?


\defineexternalfilter
  [pandoc]
  [
    filter={pandoc --no-wrap -f \externalfilterparameter{format} -t context 
                   -o \externalfilteroutputfile},
    format=twiki,
    directory=output,
    spacebefore=none,
    spaceafter=none,
    indentnext=yes,
    cache=yes
  ]

I am using ConTeXt standalone distribution and bundled modules, context  version is 2018.09.01 23:10
adityam commented 5 years ago

Use state=stop.

expilo commented 5 years ago

Thanks. In my case, with lots of pandoc environments, went down from 30s to 22s. Worth trying definitely.