Wikileaks plugin for Zotero?

I wonder whether anyone would be interested in developing a plugin for Wikileaks.
Whatever we may think of that project, it is indeed providing a mine of information that will be useful (also) to scholars. Some system of automatic download of the cables might help in arranging them in a meaningful way.
  • Indeed. But I'm not really sure this is per se Zotero's domain. Grep could probably be useful though.
  • This would be quite easy to do as a site translator. See http://www.zotero.org/support/dev/make_your_site_zotero_ready and linked articles. As with any site translator, write to zotero-dev (http://groups.google.com/group/zotero-dev/) if you have any questions about how to produce a useful translator.
  • I also think that it would be a great help in sifting through the (increasingling big) mounds of cables... I myself don't have the time right now to do this, but I found http://cablegatesearch.net to be an easy to use resource for the cables. They have lots of stats and the data is aggregated in a nice way. (Sadly no microformats/RDF etc.)
  • didn't someone already write a basic wikileaks translator? I remember seeing code on github,or did I dream that?
  • indeed there is, as I found out only minutes after i posted my reply: https://gist.github.com/1048146 :)

    I took the script and modified it slightly so that it also downloads the title of the current cable. Simply modify the line:

    title : FW.Xpath('//table[@class="cable"]/tbody/tr[2]/td/a').text().prepend("Wikileaks Cable "),
    into this

    title : FW.Xpath('//div[@class="pane big"]/h3').text().remove(/^Viewing cable /).prepend("WL Cable "),

    However, the title as displayed on http://wikileaks.org/cable/2010/01/10MADRID86.html is cut in half ("AMBASSADOR SOLOMONT'S JANUARY 25 CALL ON").
    The folks at http://www.cablegatesearch.net/ did a better job to extract the metadata from the original files. At http://www.cablegatesearch.net/cable.php?id=10MADRID86 the title is extracted in full ("Ambassador Solomont's January 25 Call On Industry/tourism/commerce Minister Sebastian").

    When I have more time I'll look into writing a translator for cablegatesearch.net ...
  • The current version is at https://github.com/zotero/translators/blob/master/Wikileaks Cables.js -- you're welcome to propose changes either there (comment on the code or just log in and click "edit this file") or on the development mailing list, zotero-dev (http://groups.google.com/group/zotero-dev).

    If you do work on a translator for something like cablegatesearch.net, I recommend using the translator framework (http://www.zotero.org/support/dev/translators/framework) and Scaffold (http://www.zotero.org/support/dev/translators/scaffold) to make your life easier.
  • Now, in 2015, the link to "the current" version is unfortunately not working anymore. I tried the version posted by 'screen', but that one does not show any connector logo in my browser. I thus suppose that it is not compatible with the current version.

    Does someone by any chance have a wikileaks translator that works with the latest zotero version? I'd be very grateful!
  • (tech note: cablegatesearch is now part of wikileaks. translator still works, just needs target adjusted, I'll get to that asap).
  • Has further work been done on this? When I add a cable from Wikileaks to Zotero it just comes in as a webpage with only the Canonical ID coming in as a tile and no other metadata.
  • Probably this fix hasn't been done. Can you give an example url you are looking at?
  • Here's an example - https://search.wikileaks.org/plusd/cables/09BRUSSELS1_a.html

    It comes in with Cable: 09BRUSSELS1_a as Title, the URL, and Accessed.

    Thanks!
  • Hmm... No, this looks more complicated and I am not familiar with this translator structure. Maybe @adamsmith has some ideas.
  • yeah, that's basically a rewrite. I'll take a look.
  • This is now fixed. Keely -- if you could get feedback from the patron you're working with on the right mapping of the cablegate/PLUSD fields to Zotero, that'd be very helpful. I wasn't really sure where to map the place and how to call the whole thing (i.e. what's now in the report Type field). Any input would be very welcome.
  • Thank you for working on this. I think I must be missing a step because even after clicking Update Now for translators under preferences, cables are still be added the same as before. https://wikileaks.org/plusd/cables/09BRUSSELS1_a.html becomes Title (Cable:09BRUSSELS1_a), URL, and Accessed. Nothing else.
  • Try again now. I didn't realize the URLs existed without the "search." part, too.
  • Excellent. Much better. I'll have the student give this a look. Thanks again.
  • Reporting that the translator only works if www is not in the URL.

    https://wikileaks.org/ = report
    https://www.wikileaks.org = web page
  • yup, that makes sense, easy fix, I'll wait for more issues and wrap them all in one fix.
  • OK, that, too is now fix. As I said, please report back with any feedback on field mapping from the user.
Sign In or Register to comment.