Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Everything posted by dfay

  1. Sorry - just had a chance to take the beta out for a spin tonight. Really impressed by the great progress you've made.
  2. While I'm redefining all the keystroke modifiers....it would also be useful to have one that copies to the clipboard a zotero:// link back to the item. Here's a javascript example of how these links are created: https://raw.githubusercontent.com/Zotero-ODF-Scan/zotero-odf-scan/master/attic/Zotero Select Item.js Or even better (for my purposes at least) -- a markdown link with the format [citation](zotero://select/items/item_key)
  3. Also -- I've realized something else as I've corrected my own misunderstanding of how CSL works. It will actually be very helpful to copy either an item's CSL citation http://docs.citationstyles.org/en/1.0.1/specification.html#citation or CSL bibliography http://docs.citationstyles.org/en/1.0.1/specification.html#bibliography . I'd actually recommend, rather than having opt-return and command-return copy different styles, there could only be one active style, with opt-return copying the citation in that style and command-return copying the bibliography entry.
  4. I'd vote for #1 to begin with. #3 would be helpful but not necessary. Ideally with a prompt & maybe an option to put it in the Zotero styles folder instead of keeping it in the workflow.
  5. Yes, you're right, and using Thomson Reuters - Legal, Tax & Accounting Australia works fine. Hmm...here's a separate python library that seems to handle the loading of dependent styles https://github.com/inveniosoftware/citeproc-py-styles in its its __init__.py
  6. Two other thoughts on the search by field: 1 - zot:creators - it would be helpful but not essential to allow search for author vs. editor 2 - it would be great to be able to search the abstract field as well
  7. This is great - search is blazing fast. I'm running into issues with some CSL styles though -- it doesn't copy successfully and gives the same error message: 22:11:00 util.py:223 INFO [0.03s] updated search index 22:11:00 cache.py:301 DEBUG [cache] opening store 'styles'... 22:11:00 styles.py:140 DEBUG [styles] style=CSLStyle(name=u'The Tort Law Review', path=u'/Users/username/Zotero/styles/the-tort-law-review.csl') 22:11:00 styles.py:141 DEBUG [styles] csl=[{u'type': u'article-journal', u'title': u'A New Ecosystems Ecology for Anthropology', u'issued': {u'date-parts': [[2003, 0, 0]]}, u'author': [{u'given': u'Thomas', u'family': u'Abel'}, {u'given': u'John Richard', u'family': u'Stepp'}], u'volume': u'7', u'container-title': u'Conservation Ecology', u'issue': u'3', u'id': u'YBE2PQP8'}] 22:11:00 workflow.py:2074 ERROR 'NoneType' object has no attribute 'render' Traceback (most recent call last): File "./lib/workflow/workflow.py", line 2067, in run func(self) File "./zh", line 493, in main return do_copy(args['<style>'], args['<key>']) File "./zh", line 289, in do_copy data = app.styles.cite(e, s) File "./lib/zothero/styles.py", line 157, in cite html = u''.join(bib_html.cite(cite, warn)) File "./lib/citeproc/frontend.py", line 102, in cite return self.style.render_citation(citation, self._cites, callback) File "./lib/citeproc/frontend.py", line 69, in render_citation return self.root.citation.render(citation, cites, callback) AttributeError: 'NoneType' object has no attribute 'render' 22:11:00 workflow.py:2076 INFO for assistance, see: https://github.com/deanishe/zothero/issues 22:11:00 workflow.py:2097 DEBUG ---------- finished in 0.517s ---------- Looks like the citeproc is expecting something it's not getting maybe?
  8. This is really an AppleScript question bc as far as I know there’s no other way to do it with Mail.app . This thread http://macscripter.net/viewtopic.php?id=43790 provides a script that would do more or less what you want. It relies on AppleScript UI scripting (i.e. simulating keystrokes and the like) which tends to make it breakable anytime there’s an OS update.
  9. Actually the API seems to be focused on managing users not content. If you can provide an example of the URL for a Libib search someone could probably help you convert that to a custom search. But based on that API I don’t think displaying search results in Alfred is possible at this point.
  10. In re: the output format, I wouldn't trouble yourself to writing RTF output code unless you've really got it in the bag already. The only formatting that's going to be needed are italics, bold, maybe underlining in a few edge cases. This can be done in HTML and piped to textutil without risk, I'd think. Also I'd agree that collections aren't necessary for the workflow. In my experience, when I would be working with a collection (organizing readings, finalizing references for a paper, etc.), I'd also have my bibliographic software open and be working in there directly. The times I'd use the workflow are when I'm writing and don't want to be interrupted but just want to quickly grab a reference or open a linked PDF. Hope that helps -- can't wait to see the finished product.
  11. Yes, seems to be working for me again, too -- thanks again Rob
  12. I haven’t dug into the code to see what’s coming out of the queries, but I think the easiest would be to map it into csl-json https://github.com/citation-style-language/schema/blob/master/csl-data.json based on the zotero field mappings here: https://aurimasv.github.io/z2csl/typeMap.xml The library should handle csl-json & spit out plain text or html - user can choose to use a markdown csl format like this https://github.com/philipbelesky/Markdown-Citation-Style-Languages but the elegance of this approach is that that will be up to the user.
  13. Yeah he had written his own export template scheme for Skim even though there’s a native one that can be implemented in a few lines of AppleScript... Basically you should just need to pipe into the CSL library and let it do its thing. Once you get it to that point post a draft & I can look at it.
  14. If you're going to start over, refactor, clean up, etc., I'd suggest the following: Search for entries (by title, author, tag, all fields) Open entries in Zotero open the attachment(s) for an entry select a CSL file for export format - see http://citationstyles.org output a single citation in the selected format's in-text style ( see http://docs.citationstyles.org/en/stable/primer.html ) output a single citation in the selected format's note style (ditto) same for selected entries in Zotero and/or contents of a group in Zotero The advantage to using CSL is that the workflow then becomes extensible to practically any citation format anyone can throw at it, with no intervention required by the developer. There are 1000s of CSL templates out there. Having reworked quite a few of smargh's AppleScripts for Skim, I suspect there is a lot that can be trimmed down.
  15. I find it much more useful to have domain/keyword specific collections as in this use scenario - there’s a lot of stuff I don’t want mixed together in snippets but still want quick access to.
  16. You are welcome to write a Java library -- Alfred can use any language on the system. All the libraries for building workflows are user-created -- I imagine if there were demand for Java, someone would have written one.
  17. Use a list filter https://www.alfredapp.com/help/workflows/inputs/list-filter/
  18. I just figured out that these themes (or the green one at least) don’t allow the user to move the alfred window - where is the setting that toggles this? or could you provide versions that allow it?
  19. seriously, doesn’t karabiner eat up more time in the customizing than it saves? thoroughly puzzled by all this...
  20. Should be fixed now - casualty of dropbox share policy changes
×
×
  • Create New...