Zotero Report Customizer 2.0

As I’ve discussed in a previous post, I’m an enthusiastic user of the free reference manager Zotero; I’m impressed with how such young, open-source product has managed to quickly outshine established, non-free alternatives like EndNote.

One difficulty I (and others) have had with Zotero, though, is in generating reports for a group of articles. Particularly, there’s no way to customize the categories you display in the report. This can be a real problem if you’re trying to share your sources with a co-author; at best, there’s a lot of unneeded metadata cluttering up the document (at worst, your email says you’ve been working on this for weeks, while your articles’ Date Added data tells a different tale…).

Now, I’m told this will be corrected in a later version of Zotero. However, I turned to PHP and a bit o’ regular expression magic to do it now. It turned out to be a good learning project, and I’ve been pleased to see that a few hundred other people (if Google Analytics is to be believed) have gotten some use out of it, too. The tool’s listed in the Zotero documentation, and–by far the most important of all–I got a free Zotero t-shirt out of the deal, which is now my favoritist garment ever.

I’ve also gotten quite a few feature requests from folks, including a request to help localize the script for German (you can find that German-language version here). Since my PHP skills have broadened in the last several months (I’m all the way to “novice” now!), I figured it was time to do an update. So, here is Zotero Report Customizer 2.0. New features include javascript form validation, a bunch of new categories, and the option to specify your own categories to delete if I don’t list ‘em. The script is also a ton easier to modify if you want to customize it to a different language, and can be set up to work in multiple languages at once. (I added a little German support for an example).

Have fun, and if you think of anything else you’d like in this, just let me know.

6 Comments

  1. Lois
    Posted June 23, 2009 at 7:31 pm | Permalink

    Hi Jason — have been looking at your Zotero Report Customizer. What I want is to change only the order of names within the Creator fields so the result shows surname first and given name(s) following. I can tinker with the Report text enough to get all the fields into a spreadsheet (which I want), but how to re-order the subfields within Creator?

    The Zotero people indicated they’d arrange for this, but evidently it hasn’t happened.

    thanks, Lois

  2. Amanda
    Posted June 25, 2009 at 12:22 am | Permalink

    Hi Jason,

    Thanks for offering up the report cleaner script! I can’t remove table elements also associated with a class, e.g. “Author”. In case you’re interested, here’s a fix suggestion.

    Within the text substitution loop, add:

    $tr_withclass_regex = ‘/\s*’ . str_ireplace(‘_’, ‘ ‘, $word) . ‘(.+?)/is’;

    $text = preg_replace($tr_withclass_regex, ”, $text);

    Cheers,
    Amanda

  3. Amanda
    Posted June 25, 2009 at 12:32 am | Permalink

    Oh, that didn’t post correctly at all, of course! The $tr_withclass_regex is the same as your $tr_regex expression, except that within the opening td html tag it allows for the class expression:

    class=”(.+?)”

    –Amanda

  4. jason
    Posted June 25, 2009 at 2:34 pm | Permalink

    Thanks, Amanda; good observation! I fixed it a little differently than you suggested: I just changed the <th> to <th[^>]*>, so that the table cell can either have a class or not.

  5. emailhy
    Posted August 28, 2010 at 5:01 pm | Permalink

    It’s great tools, but when I use bulletin in notes, it will remove the bulletin

  6. jason
    Posted August 28, 2010 at 6:43 pm | Permalink

    @emailhy: Thanks for the feedback, but I’m afraid I don’t quite understand your problem. Could you describe the problem in more detail, or perhaps send me a before/after example? Thanks.

One Trackback

  1. By Bookmarks about Analytics on November 10, 2008 at 1:30 pm

    [...] – bookmarked by 2 members originally found by TwoDollarKerplunk on 2008-10-21 Zotero Report Customizer 2.0 http://jasonpriem.com/2008/08/zotero-report-customizer-20/ – bookmarked by 2 members originally [...]

Post a Comment

Your email is never shared. Required fields are marked *

*
*