├── $__papers_ViewTemplate_abstract.tid ├── $__papers_ViewTemplate_paperheader.tid ├── README.md ├── LICENSE ├── TiddlyWiki JSON.js └── TiddlyWiki Export.js /$__papers_ViewTemplate_abstract.tid: -------------------------------------------------------------------------------- 1 | created: 20180206231403919 2 | list-after: $:/core/ui/ViewTemplate/tags 3 | modified: 20180207013455090 4 | tags: $:/tags/ViewTemplate 5 | title: $:/papers/ViewTemplate/abstract 6 | 7 | <$list filter="[all[current]tag[paper]]"> 8 | 9 | !!! Abstract: 10 | 11 | <<< 12 | <$transclude field="abstract" mode="block"/> 13 | <<< 14 | 15 | -------------------------------------------------------------------------------- /$__papers_ViewTemplate_paperheader.tid: -------------------------------------------------------------------------------- 1 | created: 20180207001256816 2 | list-after: $:/core/ui/ViewTemplate/tags 3 | modified: 20180207013547432 4 | tags: $:/tags/ViewTemplate 5 | title: $:/papers/ViewTemplate/paperheader 6 | 7 | \define doilink(doi) [ext[ $doi$ | https://doi.org/$doi$ ]] 8 | 9 | <$list filter="[all[current]tag[paper]]"> 10 |

{{!!papertitle}}

11 | 12 |

{{!!authors}}

13 |

''{{!!year}}''   //{{!!journal}}//   doi: <$macrocall $name="doilink" doi={{!!doi}} />

14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # zotero-tiddly 2 | hacks to get zotero and Tiddlywiki working together 3 | 4 | 5 | ## Installation 6 | 7 | 1. Import the `.tid` files into a tiddlywiki. 8 | 2. Install [Zutilo](https://github.com/willsALMANJ/Zutilo) and [Better BibTeX](https://retorque.re/zotero-better-bibtex/installation/) plugins for Zotero 9 | 3. Add `.js` files to `~/Zotero/translators` 10 | 4. Set `TiddlyWiki Export` as an Alt Quick copy using Zutilo 11 | 12 | ## Usage 13 | 14 | The alt quick copy will now copy a js command to the clipboard. This can pasted into the web console on TiddlyWiki to import the papers as tiddlers. 15 | 16 | Exporting from Zotero using `TiddlyWiki JSON` will create a JSON file that is importable through normal TiddlyWiki means. 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /TiddlyWiki JSON.js: -------------------------------------------------------------------------------- 1 | { 2 | "translatorID": "faaac503-93a6-48ae-b18d-3cfba59b34ba", 3 | "label": "TiddlyWiki JSON", 4 | "creator": "IL", 5 | "target": "json", 6 | "minVersion": "3.0", 7 | "maxVersion": "", 8 | "priority": 100, 9 | "displayOptions": { 10 | "exportCharset": "UTF-8xBOM", 11 | "exportNotes": false 12 | }, 13 | "inRepository": false, 14 | "translatorType": 2, 15 | "lastUpdated": "2016-06-21 08:45:20" 16 | } 17 | 18 | 19 | 20 | function doExport() { 21 | const tiddlers = []; 22 | let item; 23 | while (item = Zotero.nextItem()) { 24 | 25 | let auths = []; 26 | for (i = 0; i < item.creators.length; i++) { 27 | auths.push((item.creators[i].firstName ? item.creators[i].firstName + ' ' : '') + item.creators[i].lastName); 28 | } 29 | 30 | let tiddler = { 31 | papertitle : item.title, 32 | title: item.citationKey, 33 | journal : item.publicationTitle, 34 | doi : item.DOI, 35 | year : ZU.strToDate(item.date).year, 36 | abstract : item.abstractNote, 37 | authors : auths.join(", "), 38 | type : "text/paper", 39 | tags : "paper" 40 | }; 41 | tiddlers.push(tiddler) 42 | } 43 | Zotero.write(JSON.stringify(tiddlers)); 44 | } 45 | -------------------------------------------------------------------------------- /TiddlyWiki Export.js: -------------------------------------------------------------------------------- 1 | { 2 | "translatorID": "7b9fc4f3-ef96-4bb2-a7e3-087da12f6ac4", 3 | "label": "TiddlyWiki Export", 4 | "creator": "IL", 5 | "target": "json", 6 | "minVersion": "3.0", 7 | "maxVersion": "", 8 | "priority": 100, 9 | "displayOptions": { 10 | "exportCharset": "UTF-8xBOM", 11 | "exportNotes": false 12 | }, 13 | "inRepository": false, 14 | "translatorType": 2, 15 | "lastUpdated": "2016-06-21 08:45:20" 16 | } 17 | 18 | 19 | 20 | function doExport() { 21 | let item; 22 | var jstring = 'javascript:(function(){$tw.wiki.addTiddlers(['; 23 | while (item = Zotero.nextItem()) { 24 | let auths = []; 25 | for (i = 0; i < item.creators.length; i++) { 26 | auths.push((item.creators[i].firstName ? item.creators[i].firstName + ' ' : '') + item.creators[i].lastName); 27 | } 28 | 29 | let tiddler = { 30 | papertitle : item.title, 31 | title: item.citationKey, 32 | journal : item.publicationTitle, 33 | doi : item.DOI, 34 | year : ZU.strToDate(item.date).year, 35 | abstract : item.abstractNote, 36 | authors : auths.join(", "), 37 | type : "text/paper", 38 | tags : "paper" 39 | }; 40 | jstring += 'new $tw.Tiddler($tw.wiki.getModificationFields(),' + JSON.stringify(tiddler) + '),' 41 | } 42 | jstring += '])})();' 43 | Zotero.write(jstring); 44 | } 45 | --------------------------------------------------------------------------------