katie Posted March 27, 2014 Share Posted March 27, 2014 Andrew, Oh, I see what you mean. I'll think about whether using BibDesk is worth the time savings at this point. Thanks for you help and advice! Katie Link to comment
andrewning Posted April 3, 2014 Author Share Posted April 3, 2014 Katie I looked at implementing your requests, and unfortunately it is not an easy change. I'm using an existing API to grab formatted references, and it actually doesn't return HTML tags for italicizing. The searching part of the script does, but that data is not in APA format. Once you request the data in APA format it just returns plain text. The en-dash issue is an encoding issue, and it seems to also be a problem with the API. To do what you are hoping for in this request (and in the second request) would require incorporating a reference converter within the Alfred workflow. That's something I might think about down the road. But for now, I verified that if you first import into BibTeX it will properly italicize the journal name, display the en-dash correctly, and will work with any of the methods and not just "ref". Link to comment
katie Posted April 3, 2014 Share Posted April 3, 2014 (edited) Thanks for checking, Andrew! It sounds like a lot of work and, given that the benefits are so minimal, I can see that it's not worthwhile. But I appreciate you looking into it! I tried importing a reference into BibDesk with your workflow and it was incredibly easy. Haven't been able to set up the APA export though. I've installed tex, set the preview to apalike, tried setting it to copy as RTF. To get the reference to copy in the way you describe, did you have to use a custom template? For those out there who are new to BibDesk and want to take advantage of this workflow, this is how to get APA styled ref's from BibDesk: 1. Create an rtf file from one of the styles templates found at http://sourceforge.net/apps/mediawiki/bibdesk/index.php?title=Templates 2. To get the italicized text, etc. You have to italicize the corresponding fields in the rtf file you just made. 3. Add it as a template, then choose to "copy" as your template in the pref's. It took me a while to figure it out but it's really not that bad. I think I'm going to love BibDesk. Katie Edit: Maybe it's no so straightforward as I thought. I'm trying to import this ref (http://bit.ly/1i4syOB) to BibDesk using the book keyword. But nothing is copied to the clipboard or added to BibDesk. Edited April 4, 2014 by katie Link to comment
andrewning Posted April 4, 2014 Author Share Posted April 4, 2014 First, the problem you had with the specific book you were looking for---you uncovered a bug. These encoding issues are a pain sometimes. Anyway, it's fixed and on GitHub. For the rich text copying, I'm glad you found something that worked for you. I realized after your comment, that it wasn't working for me either. I was only looking at the TeX preview, which renders correctly, and calling it done. Because I write all my documents in LaTeX, I've never actually tried doing a rich text copy and paste. I tested some things out, and came across the template solution you mentioned. However, I found that didn't work very well for some references, for example if the reference contained non-ascii characters, or escaped an ampersand LaTeX style, etc. Instead, I came across this thread and noticed others were having the same problem, and found an alternative solution. You first need to into Preferences > TeX Preview > TeX Template and add these two lines: \usepackage{lmodern} \usepackage[T1]{fontenc} The first changes the font so that the rich text will be preserved on copy paste (you also need to install the Latin Modern fonts if you don't already have them on your system. Go into the opentype folder after downloading and drag them all into Font Book). The second line allows you to properly copy/paste accented characters. After all that, copy rich text now works. Of course the font will be in Latin Modern, but you can now change it to whatever font, and the formatting will be preserved. Link to comment
katie Posted April 5, 2014 Share Posted April 5, 2014 After your comment, I checked the template I had set up and you're absolutely right - all accented characters (and perhaps other characters) are not rendered properly. Thanks to your clear instructions, I set up your alternative method, and I can now copy and paste from the preview. The idea that the rtf template method doesn't work as expected, however, is just the kind of thing that will niggle at me until I figure out how to fix it This type of issue is why I've avoided latex - the "brief" start I made had me spending hours trying to work out the smallest of details. This is my method of procrastination. Thanks for your help setting up BibDesk!! Link to comment
walton Posted May 8, 2014 Share Posted May 8, 2014 Might be a good idea to add in some sort of error reporting for when the crossref API goes down, which seems to happen fairly often (e.g. today). Otherwise the workflow just does nothing. Link to comment
andrewning Posted May 10, 2014 Author Share Posted May 10, 2014 walton, if you could provide me an error log for when this happens that would be helpful. It's never happened to me so it's hard for me to catch the error (I guess I don't use it often enough). Link to comment
walton Posted May 10, 2014 Share Posted May 10, 2014 I am not seeing any errors. It just sort of hangs and never does anything. I tried turning on debugging in the Alfred Workflows panel and nothing shows up. Link to comment
andrewning Posted May 10, 2014 Author Share Posted May 10, 2014 OK. I've not seen this happen yet, but I'll keep an out for it. Link to comment
fredcallaway Posted May 14, 2014 Share Posted May 14, 2014 Wow. This is fucking incredible. Words cannot express how thankful I am to you for making this workflow. There's just one thing though… is there any way I can set the import reference file action to use scholar (gsref) rather than crossref? This might have to do with my field of study (computational linguistics), but scholar is much faster and more reliable for me. Thanks again! Link to comment
andrewning Posted May 14, 2014 Author Share Posted May 14, 2014 Two options: 1) the file action doesn't actually execute the crossref command, so you can always hit the HOME button and add a 'gs' before hitting enter. It purposely doesn't try to automatically execute the command so that you can change the search type, and because the file action uses some heuristics and may not necessarily grab all the right keywords that you want. 2) Open up pdf2doi.py in the workflow and in line 54 replace 'ref' with 'gsref'. Of course this will get overwritten with app updates. If this becomes an issue I could add an option where the default search for the file action would be loaded from a config file or something. fredcallaway 1 Link to comment
fredcallaway Posted May 14, 2014 Share Posted May 14, 2014 I was doing 1, but…unnecessary keystrokes, you know how it is. I actually just changed the keywords ref→cref and gsref→ref, since I use the scholar search more often any way. Link to comment
andrewning Posted May 14, 2014 Author Share Posted May 14, 2014 Yeah, I know what you mean. The extra keystrokes would drive me crazy also. Changing keywords is another good option. If this is something folks are interested in, perhaps I'll just add a config file so you can set your preference. Link to comment
dfay Posted January 21, 2017 Share Posted January 21, 2017 The crossref.org API seems to be broken and with it this workflow. Link to comment
cands Posted January 21, 2017 Share Posted January 21, 2017 Yes, it doesn't work anymore. That’s a pity, this workflow is awesome. Does anybody have ideas for workarounds? Link to comment
dfay Posted January 21, 2017 Share Posted January 21, 2017 I've reported it on the developer's GitHub repo for the workflow & he is going to give it a few days to see if it's a temporary outage, then start looking at alternatives. FWIW the book command is still working. Link to comment
cands Posted January 23, 2017 Share Posted January 23, 2017 Thank you, let's hope it's easy to fix. Link to comment
cands Posted February 1, 2017 Share Posted February 1, 2017 Now it suddenly started working for me again. Link to comment
katie Posted October 12, 2018 Share Posted October 12, 2018 I really miss this workflow. Has anyone been able to find a workaround or alternative solution? Link to comment
dfay Posted October 12, 2018 Share Posted October 12, 2018 It’s working fine for me - can’t remember how I fixed it because it’s been a while.... I’d say make sure you have the latest version from the github repo than check if your issue is covered in the tracker: https://github.com/andrewning/alfred-workflows-scientific/issues If worst comes to worst I can send you a copy of my working version. Link to comment
katie Posted October 12, 2018 Share Posted October 12, 2018 (edited) Thank you; I will try that! Just spent a good chunk of time doing this manually. Edit: And it works! I must have missed an update. This is literally the best day ever. Edited October 12, 2018 by katie dfay, cands and andrewning 3 Link to comment
katie Posted February 17 Share Posted February 17 I've installed the workflow from @emraher in issue #17 (https://github.com/andrewning/alfred-workflows-scientific/issues/17#issuecomment-912063594). The debugger shows that the workflow is looking for python 2, which doesn't exist on my device - I'm on a institution-managed computer that has python 3, but I don't have the ability/permissions to install a previous version of python. I tried changing the workflow to call python 3, hoping it was an easy fix, but that did not work. Debugger output is here: [15:19:32.856] Reference Importer[Script Filter] Queuing argument 'l' [15:19:32.969] Reference Importer[Script Filter] Script with argv '(null)' finished [15:19:32.973] ERROR: Reference Importer[Script Filter] Code 1: Traceback (most recent call last): File "/Users/ejq413/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6C06FC8C-1824-405B-9086-C3BDD31E925E/crossref.py", line 6, in <module> from workflow import Workflow File "/Users/ejq413/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6C06FC8C-1824-405B-9086-C3BDD31E925E/workflow/__init__.py", line 16, in <module> from .workflow import Workflow, manager File "/Users/ejq413/Dropbox/Alfred/Alfred.alfredpreferences/workflows/user.workflow.6C06FC8C-1824-405B-9086-C3BDD31E925E/workflow/workflow.py", line 25, in <module> import cPickle ModuleNotFoundError: No module named 'cPickle' Any help would be appreciated! Katie Link to comment
vitor Posted February 18 Share Posted February 18 @katie That GitHub issue is your best bet to find someone who’ll port it to Python 3, but I recommend instead that you look into an alternate maintained workflow, such as @pseudometa’s Supercharged Citation Picker. pseudometa 1 Link to comment
katie Posted February 18 Share Posted February 18 Thanks, @vitor. I've just downloaded the Supercharged Citation Picker, but it's for inserting citations into writing - not adding citation information to a reference manager (BibDesk) so that it can then be cited. I'm doing it manually now; I just miss this workflow! Link to comment
giovanni Posted February 19 Share Posted February 19 17 hours ago, katie said: I'm doing it manually now If you don't need the file-based tasks which will require more work, this version works for me. I am not too familiar with BibDesk, let me know if there are things I missed... vitor and katie 2 Link to comment
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