egh / zotxt

zotxt: a Zotero extension for text
http://gitlab.com/egh/zotxt
GNU General Public License v3.0
326 stars 16 forks source link

Feature request: export collection #18

Closed hyiltiz closed 4 years ago

hyiltiz commented 4 years ago

I looked for collection support in emacs-zotxt but it seems zotxt may need to provide an API for it first? Please refer to [1] for details.

https://github.com/egh/zotxt-emacs/issues/39#issuecomment-626366324

egh commented 4 years ago

@hyiltiz Yes, I believe there is no support for getting collection information. Unfortunately the internals of Zotero are not all that well documented, so I'm not sure how it easy or hard this would be. I probably won't have the time to work on this, but I always welcome pull requests.

Probably what you want is to add a new search for Collection is something. You can find similar code here: https://github.com/egh/zotxt/blob/master/extension/content/modules/Core.jsm#L151 Hope that helps!

hyiltiz commented 4 years ago

As you said, it doesn't seem to be documented at all (I cannot seem to find anything relevant in the docs). A few topics slightly relevant is here though [1,2]. If there was an API to get Zotero "Export Collection..." with the json format, it would be fairly easy to serve that up as a result of some text query in zotxt. We could parse it first according to a citation style, or serve it as is so parsing is done elsewhere...

For anyone who may be looking for something similar, @egh suggested a fairly simple workaround elsewhere [3].

[1] https://forums.zotero.org/discussion/23377/searching-collection-names/ [2] https://www.zotero.org/support/searching [3] https://www.zotero.org/support/searching