How to create Zotero RIS file from a document's bibliography
I have an ODT document in which a Zotero bibliography was inserted. Now, I need to create a RIS file that will contain all the references from my document. I have not set up any tags or folders in Zotero previously: therefore I need to work from the bibliography in the ODT file in order to retrieve the relevant references (those I want to be included in the RIS file). There are hundreds of references in the ODT file, so working manually in Zotero itself, i.e. creating a sub-folder and copying-pasting the references (those listed in the ODT file) is out of the question.
How can I work from the ODT file's bibliography itself in order to create a RIS file that can be later imported or exported?
How can I work from the ODT file's bibliography itself in order to create a RIS file that can be later imported or exported?
- Make a backup copy of my ODT file.
- On Zotero style repository <http://www.zotero.org/styles/>, install the BibTex generic style <http://www.zotero.org/styles/bibtex>
- Open the ODT file in LibreOffice. Position the mouse cursor at the end of the file.
- In the Zotero plugin menu, click "Set Document preferences"
- Choose BibTex generic citationn style.
- In LibreOffice, in the Zotero plugin menu, select "Insert bibliography".
- Now, copy the whole bibliography (in the clipboard): select the bibliography and CTRL-C.
- Open Zotero in Firefox (or Standalone).
- In Zotero, create a sub-folder (new collection), e.g. "My ODT"
- In Zotero, click on the sub-folder just created, "My ODT", and click File>Import from clipboard.
- The sub-folder (collection) "My ODT" now contains a Zotero bibliography of all the references that are contained in the original ODT document.
- Some manual editing right in Zotero may be necessary to fix some odd values.
Done!
Success!
CH 53's point above is important: automatic gathering of references cited in a document would be a solution (exactly as EndNote does). But I would bet that Zotero developers could come up with a better idea!
Gracile, could you explain further what you mean by [virtual document collections are planned (no ETA)]?
FYI, Simon's message announcing the feature: Edit: https://github.com/zotero/zotero/issues/21
You can follow the development here
https://github.com/zotero/zotero/issues/21
To keep things simple, we can apply a unique tag to references cited in a document (checking before the tag is applied, and blocking with a warning popup if the requested tag already exists). The unique tag can then be used to identify cited references where they occur. Once pulled into a single collection from the various libraries in which the target references are located, they can be exported in the usual way.
This would avoid the thorny problems of naming the collection for a document, and of deciding between copying references in from group libraries versus adding an existing reference to the (newly created) target collection. It would also avoid the problem of identifying (in code) a possibly renamed document collection when updating the set of references.
In the first instance, I'll look into implementing the functionality in MLZ. The code will be pretty simple, and if it tests well, it could be cast as a plugin for use with the mainstream client.
The approach works as described above. When a "project name" has been set in a document, a corresponding special-purpose tag will be created and updated in the client whenever citations in the document are altered.
To get things working correctly, I had to make quite a few adjustments to tag handling, so it looks like this will not be a candidate for implementation as a plugin. For mainstream Zotero support, the changes (or something like them) would need to be adopted directly.
After playing with the implementation for testing, I think I may prefer this to a "document collection", as it is a little more flexible and has a little less impact on the UI overall.
Anyway, here is the code, in case there is interest in that end of it.
If the project name is supplemented with the ID of a working library shared by the group, references into a user's personal library can be remapped into the group (creating a copy there, and rewriting the document reference to point at the group copy) before tagging the group reference with user's project name.
This would feed the collective store of references in the group library without affirmative action by each user. Duplicates can be expected accumulate in the group library, but if its curator periodically merges duplicates, user documents will continue to work normally; each researcher can just carry on with their work uninterrupted.
Pushing it one step further, if a CSL-to-Z metadata map is set up in MLZ, embedded document references inaccessible to the current user (such as a student's academic advisor) could also be pushed into the shared group registered in the document. This should largely eliminate the broken and partially broken reference issues that can be an annoyance in collaborative projects, which would be a big win.
This would be a good fit for the virtual library projects we're planning locally. I'll play around a bit with implementation; if all goes well the facility will find its way into an MLZ release sometime fairly soon.
I see that there's some recent activity over at https://github.com/zotero/zotero/issues/21. Hopefully this will bear fruit... this has been kicking around for years!
Can a non-programmer do anything to help this along?