emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Erik Hetzner <egh@e6h.org>
To: Jambunathan K <kjambunathan@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>, mail@christianmoe.com
Subject: Re: zotero-cite (A Proposal)
Date: Tue, 15 Nov 2011 21:25:45 -0800	[thread overview]
Message-ID: <87ty641vvq.wl%egh@e6h.org> (raw)
In-Reply-To: <81k4762yab.fsf_-_@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3291 bytes --]

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

[-- Attachment #2: Type: text/plain, Size: 53 bytes --]

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

  parent reply	other threads:[~2011-11-16  5:26 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-09  2:06 zotero plain, org-odt, and citations in general Matt Price
2011-11-09  5:26 ` Jambunathan K
2011-11-10 15:17   ` Jambunathan K
2011-11-10 15:50     ` Thomas S. Dye
2011-11-10 17:48     ` Erik Hetzner
2011-11-11 15:51       ` Matt Price
2011-11-11 16:12         ` Erik Hetzner
2011-11-11 18:45           ` Matt Price
2011-11-12  0:07             ` Erik Hetzner
2011-11-12 23:45           ` Christian Moe
2011-11-12 23:46             ` Christian Moe
2011-11-11 20:34       ` zotero-cite (A Proposal) Jambunathan K
2011-11-14 15:38         ` Matt Price
2011-11-16  5:25         ` Erik Hetzner [this message]
2011-11-11 21:13       ` zotero plain, org-odt, and citations in general Jambunathan K
2011-11-12  7:21         ` Christian Moe
2011-11-12 14:20           ` Matt Price
2011-11-16  5:30         ` Erik Hetzner
2011-11-09  7:03 ` Erik Hetzner
2011-11-09  7:25   ` Jambunathan K
2011-11-09 14:13     ` Ken Williams
2011-11-09 19:39       ` Christian Moe
2011-11-10  4:53         ` Erik Hetzner
2011-11-10  9:01           ` Christian Moe
2011-11-11 15:37         ` Matt Price
2011-11-11 17:51           ` Erik Hetzner
2011-11-11 18:34             ` Matt Price
2011-11-09 15:28     ` Matt Price
2011-11-10  4:40       ` Erik Hetzner
2011-11-13 22:47 ` Christian Moe
2011-11-14 15:38   ` Matt Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ty641vvq.wl%egh@e6h.org \
    --to=egh@e6h.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=kjambunathan@gmail.com \
    --cc=mail@christianmoe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).