-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function for getting the non-deprecated Zotero link. #36
base: master
Are you sure you want to change the base?
Conversation
This is mostly just adapted from Zutilo, but it seems to be considered the "blessed" version, so I'm keeping it for now.
e27db71
to
507f788
Compare
Hi @NorwegianRockCat , I met the issue about zotero link, too. The issue is discussed here: egh/zotxt-emacs#53. I wonder how to use the function |
There's not much to it. Since I figured there were others that were dependent on previous behavior, I created a new query ( So, you can still do everything that zotxt had before, it's just a new call. I still use this from time-to-time with some custom emacs code and find it very useful. |
Could you explain more about how to pass the query? I haven't written code to interact with Zotero before. Thanks. |
Sorry this slipped through the cracks. I will review soon. |
@zzeitt: In general, Zotxt creates a little HTTP server that runs from Zotero that only accepts requests from localhost (http://127.0.0.1:23119/zotxt). This is a REST endpoint. You can then point a REST client from a web browser or use CURL to ask for things. For example, asking for http://127.0.0.1:23119/zotxt/items should return a JSON structure with the current selected items and their keys. So you aren't using an API from Zotero, you are using the REST API defined by the zotxt extension (the zotxt extension is using the Zotero's API). You can do a web search for "REST Client" and your browser (e.g., Firefox) to get something to help you experiment with creating your REST queries. Hope that helps. |
Thank you sir! Your explanation is quite clear. I happen to know a little bit about Again, thank you for your help:) |
@egh Any chance for a review? This extra functionality is handy, even though it the "zotero://" url conflicts with zotxt's other URL. Still, it is very useful in my workflow. |
This adds functionality for getting the current "non-deprecated" form of the link (See Issue #30). I did this with a new format (zoteroLink) since I don't want to break the current keys or workflows.
This is mostly just adapted from Zutilo, but it seems to be considered the "blessed" version, so I'm keeping it for now.
I have never written a Zotero extension, so I don't know if I'm following everything. For example, I'm assuming that passing a bad key is caught before the zoteroLink function is called. Suggestions welcome.
Otherwise, this seems to work well enough for me. So, I'd like it to be in the actual plugin.