Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
dev:citeproc-node [2011/01/23 21:40] – created rmzelle | dev:citeproc-node [2017/11/12 19:53] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | To set up the standalone citeproc-node server: | + | < |
+ | in the process of updating the documentation for | ||
+ | <a href=" | ||
+ | may be outdated in the meantime. Thanks for your understanding.</ | ||
- | Get the source code for citeproc-node: | ||
- | <code bash>svn co https:// | ||
- | <code bash>cd citeproc-node< | + | See [[dev/citation_styles/ |
- | + | ||
- | Get citation styles | + | |
- | <code bash>hg clone https:// | + | |
- | + | ||
- | Put styles where citeproc-node | + | |
- | <code bash>mv csl-styles csl1.0</ | + | |
- | + | ||
- | Get citeproc-js | + | |
- | <code bash>hg clone https:// | + | |
- | + | ||
- | Get some sample data for later use from citeproc-js | + | |
- | <code bash>mv citeproc-js/ | + | |
- | + | ||
- | Remove unneeded citeproc-js directory | + | |
- | <code bash>rm -rf citeproc-js</ | + | |
- | + | ||
- | Get node xml processing library | + | |
- | <code bash>git clone https:// | + | |
- | + | ||
- | Get csl-locales | + | |
- | <code bash>hg clone https:// | + | |
- | + | ||
- | Your directory listing is now | + | |
- | <code bash> | + | |
- | citeprocmodule.js | + | |
- | citeprocnode.js | + | |
- | citeServerConf.json | + | |
- | citeServer.js | + | |
- | + | ||
- | (csl1.0, node-o3-xml, | + | |
- | + | ||
- | Change configured path to xml library. | + | |
- | <code bash> | + | |
- | + | ||
- | change the line: | + | |
- | " | + | |
- | to: | + | |
- | " | + | |
- | + | ||
- | Start the server (I assume node binary is in your path): | + | |
- | <code bash> | + | |
- | + | ||
- | If all is well, you will see: | + | |
- | + | ||
- | < | + | |
- | precaching CSL engines | + | |
- | processStyleIdentifier | + | |
- | short name only | + | |
- | Server running at http:// | + | |
- | zcite.createEngine | + | |
- | cpSys created | + | |
- | en-US</ | + | |
- | + | ||
- | and in 20 or 30 seconds also: | + | |
- | + | ||
- | < | + | |
- | zcite.cacheSaveEngine | + | |
- | http:// | + | |
- | saving engine | + | |
- | turn precache flag off | + | |
- | last Step</ | + | |
- | + | ||
- | -------- | + | |
- | Now to test the server. Open another window and cd into your citeproc- | + | |
- | node directory. | + | |
- | + | ||
- | 1. Edit the sampledata.html document to the expected JSON format to | + | |
- | POST: | + | |
- | <code bash>vi sampledata.html</ | + | |
- | get rid of the HTML markup at the top & bottom of the file | + | |
- | + | ||
- | delete: | + | |
- | + | ||
- | <code html>< | + | |
- | < | + | |
- | <meta http-equiv=" | + | |
- | < | + | |
- | </ | + | |
- | < | + | |
- | < | + | |
- | + | ||
- | and delete (note the semicolon -- I think that is a typo in the file, | + | |
- | so make sure and delete it): | + | |
- | + | ||
- | <code html>; | + | |
- | </ | + | |
- | </ | + | |
- | + | ||
- | 2. Now you should have a valid JSON file, BUT the server expects to | + | |
- | find an " | + | |
- | as a first line: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | and, of course, this as a last line: | + | |
- | + | ||
- | < | + | |
- | + | ||
- | 3. now save this file as " | + | |
- | + | ||
- | 4. now try posting it to your server (which you should still have | + | |
- | running): | + | |
- | + | ||
- | < | + | |
- | + | ||
- | You should see this response appear on your screen: | + | |
- | + | ||
- | <code html>< | + | |
- | <div class=" | + | |
- | engineering of & | + | |
- | i& | + | |
- | challenges.” < | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | Right: ‘Informal’ Mortgages in the Japanese Courts.” < | + | |
- | Law & Policy Journal</ | + | |
- | <div class=" | + | |
- | < | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | 1932: 562.</ | + | |
- | <div class=" | + | |
- | Protest and State Power in the Media Age</ | + | |
- | <div class=" | + | |
- | 1999.</ | + | |
- | <div class=" | + | |
- | < | + | |
- | 2000 Nativity Data</ | + | |
- | <div class=" | + | |
- | div> | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | <div class=" | + | |
- | The Emergence of Radio Sound, 1920-1926.” May 2002.</ | + | |
- | <div class=" | + | |
- | Disenchantment with Network Broadcasting, | + | |
- | Quarterly</ | + | |
- | <div class=" | + | |
- | Guantanamobile Project.” < | + | |
- | <div class=" | + | |
- | Conditions for Production of C& | + | |
- | Dicarboxylic Acids in Bioreactor Batch Cultures of an Engineered | + | |
- | & | + | |
- | < | + | |
- | div> | + | |
- | <div class=" | + | |
- | て.” < | + | |
- | <div class=" | + | |
- | </ | + |