citeproc-js in worker threads

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

citeproc-js in worker threads

fbennett
The citeproc-js bundle contains a parsing file named xmljson.js, added
quite some time ago, after a conversation with Simon Kornblith.

In a browser environment, the xmljson.js parser makes it possible to
run citeproc-js in a worker thread, where DOM methods are not
permitted. Apart from converting the style and locale XML to
JavaScript object form and installing the xmljson.js parser code, the
processor is run in the usual way, with the JS objects used as drop-in
replacements for the XML.

The missing piece to the puzzle has been the conversion method - for
initial testing, I used locales and styles pre-converted with a Python
script, which wasn't terribly convenient for production. I recently
had a need for a JS version of the converter, so here it is:

    https://github.com/fbennett/csl-json-walker

It has a CC0 license, do with it what you will. Hope it makes things easier!

Frank

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|

Re: citeproc-js in worker threads

Michel Krämer-3
In relation to citeproc-js issue #120 [1] I think this is going to be
very useful for citeproc-java! Thanks a lot for posting the tool! I'll
have a look at it over the weekend.

Cheers,
Michel

[1]
https://bitbucket.org/fbennett/citeproc-js/issue/120/create-npm-package-for-nodejs


On 19.03.2015 23:38, Frank Bennett wrote:

> The citeproc-js bundle contains a parsing file named xmljson.js, added
> quite some time ago, after a conversation with Simon Kornblith.
>
> In a browser environment, the xmljson.js parser makes it possible to
> run citeproc-js in a worker thread, where DOM methods are not
> permitted. Apart from converting the style and locale XML to
> JavaScript object form and installing the xmljson.js parser code, the
> processor is run in the usual way, with the JS objects used as drop-in
> replacements for the XML.
>
> The missing piece to the puzzle has been the conversion method - for
> initial testing, I used locales and styles pre-converted with a Python
> script, which wasn't terribly convenient for production. I recently
> had a need for a JS version of the converter, so here it is:
>
>      https://github.com/fbennett/csl-json-walker
>
> It has a CC0 license, do with it what you will. Hope it makes things easier!
>
> Frank
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> xbiblio-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>

--
Michel Krämer, M.Sc.
Deputy Head of Competence Center
Spatial Information Management

Fraunhofer Institute for Computer Graphics Research IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-415  |  Fax +49 6151 155-444
[hidden email]  |  www.igd.fraunhofer.de

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
Reply | Threaded
Open this post in threaded view
|

Re: citeproc-js in worker threads

Michel Krämer-3
And for the npm package as well of course ...

Cheers,
Michel

On 20.03.2015 07:02, Michel Krämer wrote:

> In relation to citeproc-js issue #120 [1] I think this is going to be
> very useful for citeproc-java! Thanks a lot for posting the tool! I'll
> have a look at it over the weekend.
>
> Cheers,
> Michel
>
> [1]
> https://bitbucket.org/fbennett/citeproc-js/issue/120/create-npm-package-for-nodejs
>
>
> On 19.03.2015 23:38, Frank Bennett wrote:
>> The citeproc-js bundle contains a parsing file named xmljson.js, added
>> quite some time ago, after a conversation with Simon Kornblith.
>>
>> In a browser environment, the xmljson.js parser makes it possible to
>> run citeproc-js in a worker thread, where DOM methods are not
>> permitted. Apart from converting the style and locale XML to
>> JavaScript object form and installing the xmljson.js parser code, the
>> processor is run in the usual way, with the JS objects used as drop-in
>> replacements for the XML.
>>
>> The missing piece to the puzzle has been the conversion method - for
>> initial testing, I used locales and styles pre-converted with a Python
>> script, which wasn't terribly convenient for production. I recently
>> had a need for a JS version of the converter, so here it is:
>>
>>       https://github.com/fbennett/csl-json-walker
>>
>> It has a CC0 license, do with it what you will. Hope it makes things easier!
>>
>> Frank
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> xbiblio-devel mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
>>
>

--
Michel Krämer, M.Sc.
Deputy Head of Competence Center
Spatial Information Management

Fraunhofer Institute for Computer Graphics Research IGD
Fraunhoferstr. 5  |  64283 Darmstadt  |  Germany
Tel +49 6151 155-415  |  Fax +49 6151 155-444
[hidden email]  |  www.igd.fraunhofer.de

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
xbiblio-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/xbiblio-devel