Please help support CiteULike by taking part in our survey.
Preview goes here.

Group: CiteULike-discussion - Forum Thread

Topic: General

[COMPLETED] Posted-At field in bibtex export

The last bit I need to straighten out for perfect CiteULike-BibDesk synchronization is the record creation field. The BibTeX specs are so poor that they don't have a field to represent the record creation date. CiteULike uses a custom field called "Posted-At", BibDesk has two separate fields called "Date-Modified" and "Date-Created" (ref here ). There might be relevant discussions on the microformats website as well.

I was wondering if you had any idea on how to normalize this field so that Bibdesk (or any other reference manager) will correctly interpret it. One possibility would be to allow users to manually editing a list of custom field mapping rules before exporting. Any thoughts?

Posted by dartar on 2009-06-02 12:41:11.

10 replies.    Login or join this group to post to this thread.

My first thought is simply supply BOTH Posted-At AND Date-Created. We don't store modification dates.


Would that work for you?


A "neater" option would be HTTP option like "map-Posted-At=Date-created" but I'd need to investigate that further...

Posted by thegoose on 2009-06-02 13:58:32.

problem is Date-Created is not standard BibTeX either, so you would need to add all possible variations used by reference managers :-| lacking user preferences, an extra URL parameter would be a neater solution indeed. I only need Date-Created to sort references chronologically.

Posted by dartar on 2009-06-02 16:55:13.

Straight on it...

Posted by thegoose on 2009-06-02 16:58:19.

OK, I've added an option to map any field to any other.

     http://www.citeulike.org/bibtex/user/dartar/article/4502265?fieldmap=posted-at:thegoose-is-the-bestest&fieldmap=citeulike-article-id:fred

i.e., a set of

     fieldmap=<oldval>:<newval>

Ladies and Gentlemen - I thank you

Posted by thegoose on 2009-06-02 17:39:30.

Awesome!

I tried combining field remapping and the AuthorYearTitle key option and it looks like the parameters generate some kind of conflict:

(1) http://www.citeulike.org/bibtex/user/dartar?do_username_prefix=0&key_type=4 generates a valid bibtex

(2) http://www.citeulike.org/bibtex/user/dartar?fieldmap=posted-at:date-added valid bibtex as well

(3) http://www.citeulike.org/bibtex/user/dartar?do_username_prefix=0&key_type=4&do_username_prefix=0&key_type=4 produces parsing errors and a lot of warnings, as if the conversion/escaping of special characters (quotes in particular) had stopped working.

Posted by dartar on 2009-06-03 00:16:29.

Oh, and I am not sure you can use the same GET parameter multiple times in your URI!

Posted by dartar on 2009-06-03 00:29:59.

Should be able to. Multiple params are part of HTTP spec, and that's how HTML forms work (especially a form with multiple checkboxes). And all APIs I've ever seen know about it with e.g., separate getSingleParam("fred") and getMultipleParam("fred") functions.

My example above produces

    @article{Hogg09,
        author = {Hogg, Tad   and Lerman, Kristina  },
        fred = {4502265},
        thegoose-is-the-bestest = {2009-05-11 10:09:11},
        ..... etc.
    }

as expected.


When I try (1) and (3), I get EXACTLY the same results. Is (3) correctly entered, or did you mean

     http://www.citeulike.org/bibtex/user/dartar?fieldmap=posted-at:date-added&do_username_prefix=0&key_type=4

which looks fine to me, but there are no special chars in there to mess up!!


If you can let me know a specific article_id that fails, I'll look into it.

Posted by thegoose on 2009-06-03 07:33:35.

I found the culprit - it was the same record with a broken key that I reported in the previous thread. Publication year was "# 2000" which generated a broken AuthorYearTitle key (which suggests bibtex export should do some basic field validation/stripping). Everything works fine now, thanks so much!


As you have been playing with URL parameters to override bibtex settings, what are your thoughts about the suggestion I made some months ago to implement key schemes such as these ?

Posted by dartar on 2009-06-03 08:17:27.

which suggests bibtex export should do some basic field validation/stripping

I've done that for the year in AuthorYearTitle at least. In general we're quite cautious about too much validation - sometimes articles have funny stuff in their fields.

Posted by thegoose on 2009-06-03 09:55:16.

Note about (2): the field name in BibDesk is actually Date-Added (not Date-Created).

Posted by dartar on 2009-06-03 00:17:21.

Privacy Statement | Terms & Conditions
CiteULike organises scholarly (or academic) papers or literature and provides bibliographic (which means it makes bibliographies) for universities and higher education establishments. It helps undergraduates and postgraduates. People studying for PhDs or in postdoctoral (postdoc) positions. The service is similar in scope to EndNote or RefWorks or any other reference manager like BibTeX, but it is a social bookmarking service for scientists and humanities researchers.