emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] zotero-cite (A Proposal)


From: Erik Hetzner
Subject: Re: [O] zotero-cite (A Proposal)
Date: Tue, 15 Nov 2011 21:25:45 -0800
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/23.2 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

Hi Jambunathan,

Sorry I took some time to reply. Some answers are below.

At Sat, 12 Nov 2011 02:04:52 +0530,
Jambunathan K wrote:
> 
> Hello Erik
> 
> Good news. 
> 
> Getting a frugal Zotero-based citations is *definitely* possible. It is
> just a matter of time. Your libraries already provide the necessary
> plumbing to accomplish the job. 
> 
> Long story
> ==========
> 
> For my own understanding, I tried trimming down zot4rst to it's bare
> essentials and the attached zotcite.py is the result.

That looks like the essence. Most of the code in zot4rst, as you saw,
deals with interacting with the docutils system and generating output.

> What zotcite does is this: 
> 
> For two Zotero Items, it prints their Bibliogrpahic entries and their
> Citation Reference, in "Text" format using Chicago-Author-Date style.
> 
> I believe a commandline interface could be built around this file along
> the following lines. (Will you be interested in building this interface
> for us?)
> 
> $ zotcite --style chicago --format <text> --items I1, I2 --print biblio
> $ zotcite --style chicago --format <text> --items I1, I2 --print citeref
>
> Once this is done, Emacs/Org can do invoke zotcite and get the required
> Bibliographic definitions and references using "shell-command".

I’ve adapted your script into a command line program, now included
with zotero-plain. The options are slightly different, and --format
does not work yet, but the essence is there.

Of course it requires the user to have python, etc. installed, but it
is probably easier than rewriting everything in emacs lisp.
 
> The assumption is that Emacs/Org somehow has captured zotero keys
> through org-protocol or org-zotero.el or someother means.
> 
> Here is a output from zotcite.py.
> 
> […]
> 
> IIRC, I made two changes to the export.js in your Javascript backend.
> 
> 1. I had trouble understanding the organization of citation clusters. So
>    I modified getCitationBlock as below. Note the use of "true" as a
>    second param of the appendCitationCluster. This is OK as
>    registerItemIds already does updateItems().

Thanks for catching this. That might speed things up a bit.

> […]
> 
> 2. There should be way to set the output format form python side of
>    things. I had to modify instantiateCiteProc by hand to set the output
>    format to "text". You know what output format that LibreOffice plugin
>    uses? I see "text", "html" and "rtf" as output formats. But not ODT.
>    See https://bitbucket.org/fbennett/citeproc-js/src/tip/src/formats.js

Sure, this would be easy.

I don’t know how the LibreOffice plugin works. It doesn’t take much
code, however, to translate the HTML output into something else.

> […]
> 
> Btw, I found that with my 2-day old zotero database and for printing the
> above 2 keys, the whole machinery takes a perceivably a lot of time. Is
> this your experience as well? I am not a netbook.

Yes, it is slow for me too. I wish it were faster. I don’t know if the
issue is jsbridge, or something else.

Ideally I would prefer to simply fetch citations information (as JSON,
for instance) from Zotero and process in an embedded citeproc-js
instance.

best, Erik
Sent from my free software system <http://fsf.org/>.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]