Hello everyone,
I just want to get a technical conversation going about Zotero integration with Google Docs.
Google recently introduced add-ons for Google Documents, among which is an EasyBib add-on that essentially inserts a pre-formatted bibliography into Google Docs documents. This resulted in a few people on Twitter and in the forums requesting that a similar feature for Zotero be added to Google Docs. As adamsmith explained in this post, you can essentially do the same thing using drag-and-drop from Zotero. While that's true, it would be quite nice to eventually add proper Zotero integration into Google Docs, which should be equivalent to Word/LO addons (i.e. live citations).
I started looking around at the Google Docs add-on API and I think it may be possible. The general idea is to display a pre-formatted in-text citation and associate a Zotero ID with it in a user-invisible fashion (same as is done in Word/LO with fields and bookmarks). If we end up displaying the id to the user, then it's essentially the same as ODF scan. Unfortunately, in Google Docs field codes do not exist. Bookmarks exist, but are associated with a single position in text, not a range of text. I suppose you could use two bookmarks to indicate start and end of a citation, but it becomes easy for the user to delete only one of the bookmarks and mess up this syntax. Also this system would complicate other operations (editing, deleting references, etc.)
Another possibility that is available is inserting pre-formatted citations as links and storing the reference ID as the URL (bonus points: it redirects to the reference on zotero.org). The add-on would then offer an option to strip links (same as removing field codes). Interacting with links is not very convenient, since they would be set on a segment of text without any easy way of retrieving them directly. However, if you wanted to find all citations/links in the document, you could essentially go through the document character by character and check if there is a link set there. Sounds pretty bad, but that's the best I can think of atm. If the user is trying to edit a citation, then we could check only the area surrounding the cursor for links. Scanning of the whole document would only be necessary when inserting a bibliography/updating in-text citations (this should only be done with explicit user commands, not after each addition) and stripping links, Another downside to the link approach is transferring documents from Google Docs to Word/LO. Something similar to RTF/ODF scan could be developed to convert Zotero links to live citations. Clearly this is a low priority concern.
So assuming that the above would work out for managing citations within a document, one would also need to be able to format citations/bibliography correctly. I think the most reasonable approach here would be for zotero.org to provide this through the API. The API would accept a set of references (in the order that they appear in text) as either IDs or JSON data (IDs would be easier for API users, but accepting raw JSON would be more versatile and probably somewhat easier to code on the server side) and return a set of formatted in-text references (in the same order as supplied) and the formatted bibliography. I imagine something like [ ["ref1"], ["ref2", "ref3"], ["ref1", "ref2", "ref3"] ] as the request and [ "1", "2,3", "1-3" ] as the response (plus bibliography) given a numeric style.
These are the first two core issues that I was thinking of, so I thought I'd ask for some input. Of course, the API might just not yet be suitable for Zotero integration with live citations.
Obviously this would be a good amount of work to get done and I don't expect Dan or Simon to take this up. It would be great, however, to get some input on whether Zotero would be on board with this, since it would require some additions to the API (which could, potentially, also be contributed by a third party).
Anyone have any other ideas on this topic?
Aurimas
[...]
So assuming that the above would work out for managing citations within a document, one would also need to be able to format citations/bibliography correctly. I think the most reasonable approach here would be for zotero.org to provide this through the API. The API would accept a set of references (in the order that they appear in text) as either IDs or JSON data (IDs would be easier for API users, but accepting raw JSON would be more versatile and probably somewhat easier to code on the server side) and return a set of formatted in-text references (in the same order as supplied) and the formatted bibliography. I imagine something like [ ["ref1"], ["ref2", "ref3"], ["ref1", "ref2", "ref3"] ] as the request and [ "1", "2,3", "1-3" ] as the response (plus bibliography) given a numeric style.
best, Erik
1. https://bitbucket.org/egh/zotxt
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+unsubscribe@googlegroups.com.
Hello everyone,
I just want to get a technical conversation going about Zotero integration with Google Docs.
Google recently introduced add-ons for Google Documents, among which is an EasyBib add-on that essentially inserts a pre-formatted bibliography into Google Docs documents. This resulted in a few people on Twitter and in the forums requesting that a similar feature for Zotero be added to Google Docs. As adamsmith explained in this post, you can essentially do the same thing using drag-and-drop from Zotero. While that's true, it would be quite nice to eventually add proper Zotero integration into Google Docs, which should be equivalent to Word/LO addons (i.e. live citations).
Aurimas
Hi,I'm an experienced Software Engineer who is studying part time and I'm very thankful to the Zotero team as I used it extensively in my academic studies.
I'm happy to contribute to the Google Docs plugin as I have many years of experience with web technologies, both front and back end, however I think this software would be more front-end programming (JavaScript).
I suggest to make this as an open source project so we can set up a GitHub account so people can start to contribute.
The Zotero team should delegate some supervisors who will set up the GitHub repository and will decide which features to create.
I'm happy to make a start once the project is set up, and once I have something working I can send a pull request.
Sent from Gmail Mobile
Hi,
I played with Google Apps Script, I could load all my entries from Zotero using the REST API into Google Docs. I just had to generate an API key.
There is Eclipse integration where you can store all your Google Apps Scripts on your local machine and once you save it uploads them to Google Drive. This way we could set up a Git repo for the project.
As for Jasmine, there are some native Google classes which have to be used, as long as we can mock them somehow unit testing should be fine. Integration testing is trickier, it has to be done manually for now I guess.
I can set up a really basic integration with Google Docs, I can publish it to my GitHub account and I can send a pull request. I can also publish it here so anyone can contribute.
Noticed there's a GitHub account for Zotero already: https://github.com/zotero
So? That belongs to the team, and they've shown very little interest in this.
Just to clarify, we're very interested in this and will be happy to provide feedback/guidance — and I already said above in this thread that we can make the necessary API changes to support it.
Hi,here's the Eclipse integration tutorial: https://developers.google.com/eclipse/docs/apps_script
Hi all,I've some some further playing with Google Apps script, towards a "poor mans" integration of Zotero and Google docs (via scannable cite). Let me say up front that while what I have works for me, it's for a fairly specific use case, that may not be useful for everybody. It's mainly to implement a scannable cite workflow in Google docs, that's acceptable to my collaborators.
If anybody is interested in the code I can put it up somewhere, for people to have a look. Also of course happy to have conversations with people who want to discuss this!
All the best,Bjoern
On Friday, 14 March 2014 02:02:34 UTC, Aurimas Vinckevicius wrote:Hello everyone,
I just want to get a technical conversation going about Zotero integration with Google Docs.
Google recently introduced add-ons for Google Documents, among which is an EasyBib add-on that essentially inserts a pre-formatted bibliography into Google Docs documents. This resulted in a few people on Twitter and in the forums requesting that a similar feature for Zotero be added to Google Docs. As adamsmith explained in this post, you can essentially do the same thing using drag-and-drop from Zotero. While that's true, it would be quite nice to eventually add proper Zotero integration into Google Docs, which should be equivalent to Word/LO addons (i.e. live citations).
I started looking around at the Google Docs add-on API and I think it may be possible. The general idea is to display a pre-formatted in-text citation and associate a Zotero ID with it in a user-invisible fashion (same as is done in Word/LO with fields and bookmarks). If we end up displaying the id to the user, then it's essentially the same as ODF scan. Unfortunately, in Google Docs field codes do not exist. Bookmarks exist, but are associated with a single position in text, not a range of text. I suppose you could use two bookmarks to indicate start and end of a citation, but it becomes easy for the user to delete only one of the bookmarks and mess up this syntax. Also this system would complicate other operations (editing, deleting references, etc.)
Another possibility that is available is inserting pre-formatted citations as links and storing the reference ID as the URL (bonus points: it redirects to the reference on zotero.org). The add-on would then offer an option to strip links (same as removing field codes). Interacting with links is not very convenient, since they would be set on a segment of text without any easy way of retrieving them directly. However, if you wanted to find all citations/links in the document, you could essentially go through the document character by character and check if there is a link set there. Sounds pretty bad, but that's the best I can think of atm. If the user is trying to edit a citation, then we could check only the area surrounding the cursor for links. Scanning of the whole document would only be necessary when inserting a bibliography/updating in-text citations (this should only be done with explicit user commands, not after each addition) and stripping links, Another downside to the link approach is transferring documents from Google Docs to Word/LO. Something similar to RTF/ODF scan could be developed to convert Zotero links to live citations. Clearly this is a low priority concern.
So assuming that the above would work out for managing citations within a document, one would also need to be able to format citations/bibliography correctly. I think the most reasonable approach here would be for zotero.org to provide this through the API. The API would accept a set of references (in the order that they appear in text) as either IDs or JSON data (IDs would be easier for API users, but accepting raw JSON would be more versatile and probably somewhat easier to code on the server side) and return a set of formatted in-text references (in the same order as supplied) and the formatted bibliography. I imagine something like [ ["ref1"], ["ref2", "ref3"], ["ref1", "ref2", "ref3"] ] as the request and [ "1", "2,3", "1-3" ] as the response (plus bibliography) given a numeric style.
These a
--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/90ix5AiEOzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "zotero-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zotero-dev+...@googlegroups.com.
Another possibility that is available is inserting pre-formatted citations as links and storing the reference ID as the URL (bonus points: it redirects to the reference on zotero.org). The add-on would then offer an option to strip links (same as removing field codes). Interacting with links is not very convenient, since they would be set on a segment of text without any easy way of retrieving them directly. However, if you wanted to find all citations/links in the document, you could essentially go through the document character by character and check if there is a link set there. Sounds pretty bad, but that's the best I can think of atm. If the user is trying to edit a citation, then we could check only the area surrounding the cursor for links. Scanning of the whole document would only be necessary when inserting a bibliography/updating in-text citations (this should only be done with explicit user commands, not after each addition) and stripping links, Another downside to the link approach is transferring documents from Google Docs to Word/LO. Something similar to RTF/ODF scan could be developed to convert Zotero links to live citations. Clearly this is a low priority concern.
I'm certainly interested (speaking as someone who's about to take a 6 week sabbatical to finish my thesis, currently sitting 80% complete in markdown with a homegrown zotero citation solution).
On Mon, May 12, 2014 at 3:07 AM, Marnen Laibow-Koser <mar...@marnen.org> wrote:
On Sunday, May 11, 2014, Bjoern Hassler <bjo...@gmail.com> wrote:
Hi all,I've some some further playing with Google Apps script, towards a "poor mans" integration of Zotero and Google docs (via scannable cite). Let me say up front that while what I have works for me, it's for a fairly specific use case, that may not be useful for everybody. It's mainly to implement a scannable cite workflow in Google docs, that's acceptable to my collaborators.[...]If anybody is interested in the code I can put it up somewhere, for people to have a look. Also of course happy to have conversations with people who want to discuss this!Yes, please put it on GitHub or somewhere. It may not be directly useful, but I suspect there's code that can be incorporated into other projects...
All the best,Bjoern
On Friday, 14 March 2014 02:02:34 UTC, Aurimas Vinckevicius wrote:Hello everyone,
I just want to get a technical conversation going about Zotero integration with Google Docs.
Google recently introduced add-ons for Google Documents, among which is an EasyBib add-on that essentially inserts a pre-formatted bibliography into Google Docs documents. This resulted in a few people on Twitter and in the forums requesting that a similar feature for Zotero be added to Google Docs. As adamsmith explained in this post, you can essentially do the same thing using drag-and-drop from Zotero. While that's true, it would be quite nice to eventually add proper Zotero integration into Google Docs, which should be equivalent to Word/LO addons (i.e. live citations).
I started looking around at the Google Docs add-on API and I think it may be possible. The general idea is to display a pre-formatted in-text citation and associate a Zotero ID with it in a user-invisible fashion (same as is done in Word/LO with fields and bookmarks). If we end up displaying the id to the user, then it's essentially the same as ODF scan. Unfortunately, in Google Docs field codes do not exist. Bookmarks exist, but are associated with a single position in text, not a range of text. I suppose you could use two bookmarks to indicate start and end of a citation, but it becomes easy for the user to delete only one of the bookmarks and mess up this syntax. Also this system would complicate other operations (editing, deleting references, etc.)
Another possibility that is available is inserting pre-formatted citations as links and storing the reference ID as the URL (bonus points: it redirects to the reference on zotero.org). The add-on would then offer an option to strip links (same as removing field codes). Interacting with links is not very convenient, since they would be set on a segment of text without any easy way of retrieving them directly. However, if you wanted to find all citations/links in the document, you could essentially go through the document character by character and check if there is a link set there. Sounds pretty bad, but that's the best I can think of atm. If the user is trying to edit a citation, then we could check only the area surrounding the cursor for links. Scanning of the whole document would only be necessary when inserting a bibliography/updating in-text citations (this should only be done with explicit user commands, not after each addition) and stripping links, Another downside to the link approach is transferring documents from Google Docs to Word/LO. Something similar to RTF/ODF scan could be developed to convert Zotero links to live citations. Clearly this is a low priority concern.
So assuming that the above would work out for managing citations within a document, one would also need to be able to format citations/bibliography correctly. I think the most reasonable approach here would be for zotero.org to provide this through the API. The API would accept a set of references (in the order that they appear in text) as either IDs or JSON data (IDs would be easier for API users, but accepting raw JSON would be more versatile and probably somewhat easier to code on the server side) and return a set of formatted in-text references (in the same order as supplied) and the formatted bibliography. I imagine something like [ ["ref1"], ["ref2", "ref3"], ["ref1", "ref2", "ref3"] ] as the request and [ "1", "2,3", "1-3" ] as the response (plus bibliography) given a numeric style.
These a
--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/90ix5AiEOzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+unsubscribe@googlegroups.com.
To post to this group, send email to zoter...@googlegroups.com.
Visit this group at http://groups.google.com/group/zotero-dev.
For more options, visit https://groups.google.com/d/optout.
I'm not following your "problem". Why wait to "release"?
--
You received this message because you are subscribed to a topic in the Google Groups "zotero-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zotero-dev/90ix5AiEOzQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zotero-dev+...@googlegroups.com.
Hi there,I did write a little bit of code some time ago, but ended up doing it outside google docs - a hack, to get a quick result, that's not worth replicating. [Basically, I took a url to an article in my online zotero library, reformatted the text to look like the reference (using a shell script), and pasted it into a google document. This preserves the link to the zotero library (in case you want to look up the reference), but also allows you to process the document afterwards (as html) to create the bibliography. Like I said, a hack.]
In terms of my own priorities: I'm (initially) not too bothered about adding references from within Docs (like you can in OO/Word).
Instead, I'd be happy to look these up in zotero, and (e.g.) have a quick copy option that produces the reference that can be pasted into the google doc (ideally linking back to zotero).
However, what would be really helpful is to have a AppsScript that can extract such references and create a bibliography from them.