[referencer] Can plugins access tags and notes fields?

Mads Chr. Olesen mads at mchro.dk
Wed Jan 23 22:13:03 EST 2013


tor, 24 01 2013 kl. 13:52 +1100, skrev Douglas Rees:
> I've been using referencer for all of a day, and I'm quite impressed
> (I 
> especially like the ease of DOI lookup, once you get past the 
> registration hurdle [is it possible to have a link in the dialog box,
> or selectable text?])

Are you talking about the "crossref" plugin?

> I'm only an amateur pythoner, but I'd like to write a plugin that
> would 
> generate an annotated biography (current idea is to generate a LaTeX 
> file with a full citation of each selected reference followed by some 
> notes), possibly separating it into several sections.

If you use the most recent release (1.2.0) there is an option under
"Files" to "Export notes as HTML", which might be similar to what you
want.

> For this to work I'd need to be able to access the notes field of the 
> reference, but I can't seem to find a way of doing it (there is no 
> get_notes() function, but is there some other function that could
> return the notes?), and I'm similarly unsure about whether plugins can
> access tags.

I just implemented a doc.getNotes() and doc.setNotes() function, and
pushed it to trunk. If you can compile trunk, you can use these.

Accessing the tags is a bit more involved, but I will try to take a look
at it later today. If I forget, could you open a bug about it or remind
me in some other way?

> This way I'd be able to keep my references and notes together, and 
> easily be able to generate something extra to show my supervisor that 
> I'm actually doing something (well, there are several extra
> possibilities).

I use the attached, quite hacky, python script to generate a
reStructuredText like list of my publications [1] from the BibTex file
generated from Referencer. It is not very robust, and barfs at all kinds
of character problems.

[1] http://people.cs.aau.dk/~mchro/pubs.html

-- 
Mads Chr. Olesen <mads at mchro.dk>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: generate_bib.py
Type: text/x-python
Size: 2912 bytes
Desc: not available
URL: <http://icculus.org/pipermail/referencer/attachments/20130124/28e35747/attachment.py>


More information about the referencer mailing list