This script it intended to allow for the easy addition of citations from documents stored in DT whilst writing in OmniOutliner . The citations are not meant to be academically rigorous or to conform to a particular standard (although they could be made so) but may be useful for lawyers or journalists who keep their material in structured groups.
Each row in OmniOutliner has three parts - The Topic field, for writing, the Quotation field for keeping a copy of the passage from the DT document and the row note field for keeping the citations themselves. Later on the OO document could be exported to Microsoft Word and the citations converted to footnotes.
Usage:
-
Open an omnioutliner document with at least a column headed “Quotation” (I use a standard Omnioutliner document customised to my requirement and stored as a template in the templates folder accessible through the "Open scripts folder menu item)
-
Open a Devonthink document, either a pdf or an rtf and highlight text
-
Run the script
-
Choose the citation format from the list
(if you don’t see the row note field you may have to choose View->Show all notes from the Omnioutliner menus)
Purpose:
- This script places a hyperlinked citation to the currently open DT document in the Notes field of a selected OO row and places the selected text in the Quotation cell of the OO row. New quotations and citations are added as a new row after the selected row or at the end of the document
Hyperlinked citations will link to, in the the case of pdf documents, the page, an in the case of rtf documents through a text search to the paragraph.
Preconditions:
- An OmniOutliner document must be open.
- The OmniOutliner document must have at least a columns called “Quotation”.
Quotation formats:
At the moment the script has three possible citations formats:
-
The name of the document and the page i.e “Entropy in Judicial Decision Making : 434”
-
The name of the parent group, the name of the document and the page. Thus where the parent group is the name of the author and the name of the document is the paper the citation will be “World Law Journal, Entropy in Judicial Decision Making : 434”. Where the document appears in more than one group, the list will have a citation referencing each of the the groups. For these purposes a tag also counts as a group. So if the article is tagged with the author “Khumalo, J” then there will be an option to the cite the document as “Khumalo, J: Entropy in Judicial Decision Making : 434”.
- The Bates number when the spotlight comment field contains a valid Bates number. This thread deals with the scheme for Bates numbering [url]Bates numbering of pdfs from within Devonthink]
It is possible to construct your own citation formats. Please see the comments in the relevant section of the code. I would think its quite possible to extract references from Bookends, Papers or Endnotes but I have no experience of using them. Pdfs imported from Bookends have amongst other properties, the Author property set, which could easily be used as part of the citation creation.
Frederiko
[edit 20150502] Thank you to korm for pointing out the behaviour relating to the insertion of citations was confusing. New quotations and citations are now always added as a new row after the selected row or at the end of the document. This is the same behavior as in this script [url]Put up Example page] The ability to add an additional citation to an existing row has been removed.
[edit 20160929]Bates numbering scheme updated for more flexible format. Correctly deals with accented characters thanks to hermeneut
Cite&Write with OmniOutliner v1.02.scpt.zip (26.7 KB)