Where are all "command-line" accessible js-scripts documented?

I am excited to find that I can call Zotero functionalities through "command-line", with the help of "Vimperator plugin". For example, setting up the following mapping in _vimperatorrc will *add* the current page (tab) to Zotero as a new item to Zotero collection.

map zp :js ZoteroPane.addItemFromPage()

However, when I have got Vimperator enabled and type the first few characters (":js ZoteroPane." and hit tab for completion), there seems to be a library of functions that I can call.

Where are all these functions documented? And, how, for example, have the Zotero functionalities been divided into the following list:
- Zotero_Browser
- Zotero_File_Exporter
- Zotero_LocateMenu
- Zotero_Lookup
- Zotero_RecognizePDF
- Zotero_Report_Interface
- Zotero_Timeline_Interface
- ZoteroItemPane
- ZoteroOverlay
- ZoteroPane
- ZoteroPane_Local
- Zotero_Overlay

I know very little about Java, and therefore cannot understand the documentation for the FULL JavaScript API. Could anyone point me to the right direction? I would like to unleash the full power of Zotero with the help of Vimperator.

Hope this make sense to the community, and I am looking forward to advice on the rich library of Zotero functionalities.

Thank you!

-LL
  • There's no such documentation, sorry. You'd have to actually
    look into the source code (which, of course, is even harder to read than the javascript API documentation, though FWIW, the functions are described in comments in the source code.

    Vimperator doesn't work with Zotero Standalone, does it? If I remember this correctly, and with Zotero 5.0 not available as Firefox add-on (due to changes in Firefox coming later this year), it's probably not worth going through the trouble of working on such documentation.
  • Thank you for clarifying; will just use tab-completions to navigate the options once I have time. Shall also post my list of mappings to this post.

    I am not sure about Vimperator + Zotero Standalone. I was using Vimperator + Firefox + Zotero Adds-on. I am very new to Zotero as of this point. Thanks for the headsup on Firefox add-on.

    Could you briefly go over what are the list of "Zotero objects"? The source code is even hard for me to find on Github (the project's folder structure is yet a "myth" to me).
  • sorry, way too many to list (this being javascript, every function can be treated as an object). But almost the entirety of the relevant sourcecode are the files in
    https://github.com/zotero/zotero/tree/master/chrome/content/zotero
    and https://github.com/zotero/zotero/tree/master/chrome/content/zotero/xpcom
  • Looks good; thank you for pointing out the sourcecode.
  • Sight, since zotero 5.0 is released, I don't think it works anymore.
    I checked the source code in background.js
    and adding a snapshot of current page is implemented in a function _saveAsWebpage(tab, withSnapShot), but I have no idea how to run this function in vimperator
Sign In or Register to comment.