I've updated
https://github.com/elifesciences/refract/blob/master/getting_started.md
to clarify how to set the `CACHE_WARM_FILE`, and give a indication on
how refract pulls that in, however I ran into some issues.
As I'm interested in testing against arbitrary XML files, I pushed the file
`e00863.source.xml` onto an S3 bucket that I had access to at:
`
http://elife-static-web-host-test.s3-website-eu-west-1.amazonaws.com`.
I uploaded the `warm.txt` file.
I managed to get refract to call to this cache warming file. At this
point I found out that `lib/cache_warmer.js` is hard coding the regex
for looking for the document id.
I tried modifying this to not break with my file name, I detailed my
changes in this gist:
https://gist.github.com/IanMulvany/6317811
That led to some errors, so I modified it a bit more to extract a
numerical ID, but I'm now getting the following error:
error during conversion ReferenceError: id is not defined
at Object.GetCitations.node.onopentag
(/Users/ian/tmp/test-lens/refract/lib/converter.js:1938:31)
at emit (/Users/ian/tmp/test-lens/refract/node_modules/sax/lib/sax.js:589:33)
at emitNode
(/Users/ian/tmp/test-lens/refract/node_modules/sax/lib/sax.js:594:3)
at openTag (/Users/ian/tmp/test-lens/refract/node_modules/sax/lib/sax.js:774:3)
at Object.write
(/Users/ian/tmp/test-lens/refract/node_modules/sax/lib/sax.js:1164:29)
at ParsePaper (/Users/ian/tmp/test-lens/refract/lib/converter.js:1287:14)
at convert (/Users/ian/tmp/test-lens/refract/lib/converter.js:2328:5)
at /Users/ian/tmp/test-lens/refract/lib/converter.js:2336:9
at IncomingMessage.<anonymous>
(/Users/ian/tmp/test-lens/refract/lib/util.js:64:7)
at IncomingMessage.EventEmitter.emit (events.js:117:20)
Cache warmed.
I'm afraid I don't have any more time to look at this today.