deanishe Posted December 22, 2017 Posted December 22, 2017 5 hours ago, Damoeire said: Mine was a stand-alone note, created by Zotero-File-New Note Right. No, they're not supported because: 5 hours ago, Damoeire said: they can't be cited Apart from not really fitting the data model (no author etc.), I figured the whole point of the workflow is to quickly copy citations. 5 hours ago, Damoeire said: but it's just taken from the first line of the note. This is correct.
mosb Posted December 22, 2017 Posted December 22, 2017 @deanishe: enormous thanks, the more recent updates to the workflow resolved my earlier issues. You are a star. I am thrilled to have this workflow. One feature request: could the workflow be used to export bibtex? No big deal if this is difficult, as doing so currently only requires me to use the workflow to navigate to Zotero, and then to quick-copy using a shortcut.
dfay Posted December 22, 2017 Posted December 22, 2017 You should be able to export Bibtex by setting your style to this csl file : https://github.com/citation-style-language/styles/blob/master/bibtex.csl I haven’t tried it (I tend to go from bibtex to zotero, not the other way around...) but it’s been around for 7-8 years and I expect it will produce valid bibtex .
deanishe Posted December 22, 2017 Posted December 22, 2017 Just uploaded v0.1.4-beta. Add resolution of dependent styles Add support for different locales Force full re-indexing of Zotero entries when the db changes Copy citation-style and bibliography-style citations for one style Generate citations with Ruby instead (citeproc-py is buggy as hell) Add action to open logfile I think I'm pretty close to a v1 release now.
dfay Posted December 23, 2017 Posted December 23, 2017 Just tried 0.1.5 from GitHub with a few different CSLs and Zotero entries and have no problems to report. I installed the BibTeX CSL mentioned above and it works, too. Ruby citeproc is a little slow. But certainly useable. Seems ready to release from what I can tell.
deanishe Posted December 23, 2017 Posted December 23, 2017 59 minutes ago, dfay said: Ruby citeproc is a little slow. Isn't it? But citeproc-py was choking left, right and centre. It had to go in the bin. I'll look for a faster solution, but at least it's working fairly reliably. One thing I'd like in order to do some more thorough testing is more "exotic" citation styles with stuff like bold, super-/subscript, underline etc. citeproc-ruby's formatting support seems rather more limited than py's, and my custom HTML-to-RTF converter needs more testing.
mosb Posted December 24, 2017 Posted December 24, 2017 @dfayThanks heaps for the tip! The bibtex csl works perfectly. @deanishe Absolutely brilliant work: thanks again!
deanishe Posted December 24, 2017 Posted December 24, 2017 Let's call this "release candidate 1". I've replaced Ruby with JavaScript in v0.2-beta. It's 2–3x faster (though still takes about a second to generate the citation), and several megabytes smaller. Damoeire 1
Damoeire Posted December 29, 2017 Posted December 29, 2017 I've been on Christmas break, and have been away from the computer for the most part. I did notice today that when I chose zotconf it told me that the workflow was up to date even though I didn't have the latest one. I don't know if that's an issue for you, but the update worked flawlessly. I'll keep testing it.
dfay Posted December 29, 2017 Posted December 29, 2017 Just got a chance to try 0.2 b & it's definitely much faster. No other issues except the same updater quirk noted above.
deanishe Posted December 29, 2017 Posted December 29, 2017 3 hours ago, Damoeire said: it told me that the workflow was up to date even though I didn't have the latest one It only checks once a day for updates. It's likely it hadn't pulled the latest list of releases.
Damoeire Posted January 4, 2018 Posted January 4, 2018 Now the work has started again its great to have this workflow. A reminder to myself and anyone else that uses ZotHero to buy @deanishe a beer or two. I'm doing that now. Personally, I would find being able to use first name in the author search useful as well. I know its common practice to refer to authors by their last name, but sometimes, the brain just doesn't work that way and all you can think of is the first name.
deanishe Posted January 4, 2018 Posted January 4, 2018 11 minutes ago, Damoeire said: I'm doing that now. Thanks very much! 12 minutes ago, Damoeire said: I would find being able to use first name in the author search useful as well Easy enough to do if it isn't going to mess up search results too much.
Damoeire Posted January 4, 2018 Posted January 4, 2018 3 minutes ago, deanishe said: Easy enough to do if it isn't going to mess up search results too much. I can't see how it would. Unless your searching for a very short last name, like 'Oh'. I suppose then it could annoy someone. Benefits outweigh the negative in my opinion, but we could wait and see if others have an opinion. 6 minutes ago, deanishe said: Thanks very much! Thank you very much! It was a very small price to pay, two beers. I hope other users do the same, it was great work that you had little or no reason to do!
Basket Posted January 5, 2018 Posted January 5, 2018 (edited) Hey everyone, Thank you SO much for the work being done to redo this workflow for Alfred 3. I use a Zotero plugin called Better Bibtex ( https://github.com/retorquere/zotero-better-bibtex ) in order to use Zotero to generate .bib files to work with LaTeX. This plugin creates a Citation Key in the info pane: that is then referred to in a LaTex file (ie, \cite{berkowitz_exchange_1999} ). I was wondering if it is possible to add the ability to copy this citation key into ZotHero - I have minimal experience coding so I'm unsure if this is at all feasible, or simple. P.S., How many euros is a beer? I've never had the pleasure to visit Europe. Edited January 5, 2018 by Basket
deanishe Posted January 5, 2018 Posted January 5, 2018 (edited) 1 hour ago, Basket said: I was wondering if it is possible to add the ability to copy this citation key into ZotHero See @dfay's post further up the page. I think that's what you're looking for? EDIT: You might be better off with the CSL style from the plugin. As best as I can tell, it works with standard Zotero data, not anything plugin-specific. In any case, the workflow can't access the plugin's data. It only reads Zotero's database and styles directory. The plugin's data appears to only exist within the running app, so the workflow can't get at it. 1 hour ago, Basket said: How many euros is a beer? About €4 for a man-sized one. Less for the funny little ones the Germans drink. Edited January 5, 2018 by deanishe
dfay Posted January 11, 2018 Posted January 11, 2018 Would it be possible to keep the query in Alfred’s history so if the user calls up Alfred again, the query would be there? For distraction-prone academics this is actually quite useful ?
deanishe Posted January 11, 2018 Posted January 11, 2018 Alfred will remember the query as long as you're using the zot keyword. If you're using zot: to select a field to search, Alfred won't because it doesn't remember queries entered in External Trigger mode (when the workflow's logo is show on the right of the query box). FWIW, when you choose a field from zot:, all the workflow does is call the normal zot search with title: or tags: as the query.
Damoeire Posted January 11, 2018 Posted January 11, 2018 @deanishe Would you mind me letting people know about this workflow on other sites. Ie. Zotero forums and whatnot? If you don't mind, I presume I would direct them to the github page?
deanishe Posted January 12, 2018 Posted January 12, 2018 (edited) 11 hours ago, Damoeire said: Would you mind me letting people know about this workflow on other sites Not at all. I should probably give the workflow its own thread on the forum first though. And yeah, GitHub would be the right place to point them to. Edited January 12, 2018 by deanishe
Damoeire Posted January 13, 2018 Posted January 13, 2018 Ok, I'll wait until you've given it its own thread then start spreading the word.
cands Posted January 15, 2018 Posted January 15, 2018 (edited) This seems awesome, but I can't get it to work. For any keyword (also 'zotconf') I get the error “'NoneType' object has no attribute 'name'”. I'm using Alfred 3.2.1 on macOS 10.12.6. I paste the debug log below. Any ideas? Starting debug for 'ZotHero' [2018-01-16 00:46:00][STDERR: input.scriptfilter] . 00:46:00 workflow.py:2055 DEBUG ---------- ZotHero (0.2.0-beta) ---------- 00:46:00 workflow.py:1462 DEBUG reading settings from /Users/xxxxx/Library/Application Support/Alfred 3/Workflow Data/net.deanishe.alfred.zothero/settings.json 00:46:00 workflow.py:2339 DEBUG update check not due 00:46:00 zh:580 DEBUG args={'--bibliography': False, '--help': False, '--style': None, '--text': None, '--title': None, '<id>': None, '<query>': u'', '<style>': None, 'attachments': False, 'citations': False, 'clear': False, 'config': True, 'copy': False, 'fields': False, 'locale': False, 'notify': False, 'reindex': False, 'search': False, 'select': False} 00:46:00 core.py:49 DEBUG [core] cachedir=u'~/Library/Caches/com.runningwithcrayons.Alfred-3/Workflow Data/net.deanishe.alfred.zothero' 00:46:00 core.py:50 DEBUG [core] zotero_dir=u'~/Work/References/Zotero' 00:46:00 core.py:51 DEBUG [core] attachments_dir=None 00:46:00 core.py:109 DEBUG [core] storage=u'~/Work/References/Zotero/storage' 00:46:00 core.py:110 DEBUG [core] styles=u'~/Work/References/Zotero/styles' 00:46:00 cache.py:300 DEBUG [cache] opening store 'styles'... 00:46:00 cache.py:300 DEBUG [cache] opening store 'modtimes'... 00:46:00 workflow.py:2074 ERROR 'NoneType' object has no attribute 'name' Traceback (most recent call last): File "./lib/workflow/workflow.py", line 2067, in run func(self) File "./zh", line 610, in main return do_config(args['<query>']) File "./zh", line 332, in do_config log.debug(u'Default style: %s', style.name) AttributeError: 'NoneType' object has no attribute 'name' 00:46:00 workflow.py:2076 INFO for assistance, see: https://github.com/deanishe/zothero/issues 00:46:00 workflow.py:2097 DEBUG ---------- finished in 0.070s ---------- Edited January 15, 2018 by cands
deanishe Posted January 16, 2018 Posted January 16, 2018 It sounds like you have an invalid style set. Did you delete the style from Zotero? Open the workflow variables sheet in Alfred Preferences and make sure the CITE_STYLE variable is empty, then try again. I've added some code to catch this error, which will be in the next release.
cands Posted January 16, 2018 Posted January 16, 2018 You're right (as usual), thanks! I had written "IEEE" in the Workflow Environment Variable CITE_STYLE. That is a valid style. However, after removing it the workflow is working again. When using the built-in function to set the cite style I can now use IEEE, and I see that CITE_STYLE has been set to "http://www.zotero.org/styles/ieee" (I now see in the manual that you recommend to adjust the CITE_STYLE or LOCALE variables by using the zotconf keyword). Wow this workflow is super handy, thank you very much!
deanishe Posted January 16, 2018 Posted January 16, 2018 It’s a bug in any case. It shouldn’t die without letting you fix a bad setting. Also, even if CITE_STYLE were valid, deleting the style from Zotero would cause the same error. So thanks for finding the bug. 4 hours ago, cands said: you recommend to adjust the CITE_STYLE or LOCALE variables by using the zotconf keyword Yeah. UsIng the URL as an identifier is much safer, as it’s basically guaranteed to be unique. Perhaps I need to edit the README to emphasise how bad an idea setting the variables by hand is. I suppose requiring users to change some settings by hand but avoid editing others isn’t the best approach. I should probably also make sure it doesn’t choke on an invalid LOCALE… cands 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now