Jump to content

iandol

Member
  • Posts

    166
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by iandol

  1. Does anyone have any updated info on whether there is a way to get this built-in applescript progress indicator to work for scripts in workflows? Is the only other alternative cocoaDialog? Thanks for any pointers...
  2. Hard for me to tell (lots of bookmarks in Chrome and both display results immediately); but this version does fuzzy search which is great!!!
  3. Anaconda (a popular scientific computing distribution of Python) installs Python this way, and for my use for scientific computing all works fine. All it really does is use user path order, so it was easy to revert back to system python in .zshrc. Back to the development workflow, one slight wrinkle in the Github + Dropbox symlink model — this is optimal for single machine use, but if you use two or more machines, then there is probably some circular mess you could get yourself into. My solution is that only machineA symlinks from the github repo to Dropboxed-AlfredPrefs, my others do not. In this case I need to remember if I edit something in Alfred on machineB, it will not be visible in the local github folder of machineB, only machineA. I can manually copy to machineB local github folder, but I'd rather just have a rule to only push from machineA.
  4. Alejandro, wow this is very fast, even in e.g. Chrome with lots of bookmark menu entries...
  5. Hi, just to say I've modified this to search case insensitive and updated internally to use JSON rather than XML.
  6. Bookends is an excellent bibliographic/research manager for macOS. This Alfred workflow curates 11 tools together in one interface to interact with Bookends and other apps. You can use Alfred keywords (be…) and/or bind your preferred key combination to trigger these directly. It has been designed for Alfred 3, and should keep itself up-to-date using OneUpdater. More Information… —<>— Download Directly… key: ?: select some text in another app then trigger tool — ?: select reference(s) within Bookends then trigger tool — ⌨️: trigger tool and enter some text in Alfred beidsearch ? — Find a selected uniqueID in Bookends. For example, if you have a temporary citation like {Koffka, 1922, #6475} in your word-processor, double-click select the Bookends ID `6475`, then trigger this workflow and it will find the reference in Bookends for you. bebrowser ? — Search selected text in Bookends browser. For the Pubmed interface you should select this manually in the bookends browser. Because this uses `System Events`, sometimes the automatic paste into the search field fails, in which case you need to manually press ⌘V and ⌅ (enter) to trigger the search. berefsearch ? — Take some selected text like "(Doe et al., 2005)" citation, clean it up become "Doe 2005" and send it to Bookend's quick search. This is great because you can take a formatted ref in a text document and search for the first author/year, then quickly paste back (⌘Y for Scrivener) the Bookends style temporary citation in its place! bequickadd ? — Take a text selected DOI / PMID / ISBN or JSTOR identifier in any app and use Quick Add (feature added in Bookends 13.0.3+) to quickly add this reference to the database. betoopml ? — Select multiple references within Bookends, then run this to create an OPML file which you can import into Scrivener or other OPML-aware tool. This will contain the abstract and notes which is very useful for research. It contains links back to the Bookends reference. You can configure the export path in the workflow variables (default Desktop/). bescopus ? — Select a reference (with a DOI) in Bookends, then trigger this to search Scopus with the DOI. It will return an inline results list for the Scopus entry AND the Cited-by page. Select an entry to go to that page. It will also append these Scopus URLs in the Notes field for future reference. You can enter your Scopus API key in the workflow variables. betobibtex ⌨️ — You enter the name of a Bookends static/smart group name and this will create a BibTeX bibliography file for those particular groups. Very useful for Pandoc and/or LaTeX workflows. You can optionally generate JSON instead of BIB (faster if use pandoc-citeproc). You can configure the export path in the workflow variables (default Desktop/). becite ⌨️ — You enter author or editor name{s} along with an optional YEAR (case insensitive REGEX), and get an inline results list. You can [enter] to paste this as a temporary citation (or use: ⌘ pastes Pandoc style, ⌥ pastes MMD style, ⌃ pastes formatted ref, ⇧ opens ref in Bookends, [space] quicklooks attachment). betitle ⌨️ — You enter word{s} in the title or keyworkds , along with an optional YEAR (case insensitive REGEX), and get an inline results list. You can then paste this as a temporary citation (or use: ⌘ pastes Pandoc style, ⌥ pastes MMD style, ⌃ pastes formatted ref, ⇧ opens ref in Bookends, [space] quicklooks attachment). beall ⌨️ — You enter word in any field (case insensitive REGEX), and get an inline results list. You can then paste this as a temporary citation (or use: ⌘ pastes Pandoc style, ⌥ pastes MMD style, ⌃ pastes formatted ref, ⇧ opens ref in Bookends, [space] quicklooks attachment). bebib ⌨️ — You enter an author / editor name, and get an inline results list. You can [enter] to paste this as a formatted reference (or use: ⌘ pastes MMD style, ⌥ pastes Pandoc style). becite, betitle, beall and bebib were inspired by the tool by Eggman which I've rewritten in Ruby to be faster and more flexible. Changelog 1.2.9 — add a new workflow variable `tempCitationStyle` that sets the default temporary citation format for becite / betitle / beall. When unset it will be the Bookends standard, but you can set the variable to `Pandoc` / `MMD` / `LaTeX` to paste the citation in a different format (`[@key]` / `[#key]` / `\\cite[]{key}`). Also if the authors field is empty for a reference, we now try to use editor names instead in the Alfred results list. 1.2.8 — add phrase search, so for example 'cartesian theatre' 2016 will find papers that use that exact phrase rather than before where cartesian and theatre were searched irrespective of their location. 1.2.5 — becite/betitle/beall first AND last author names with initials are now shown, and if an attachment is present you can Quicklook it directly from Alfred without losing focus (press shift or ⌘Y)! 1.2.4 — becite/betitle/beall now show if a reference has an attachment, and for BE13 users use the new applescript events that are slightly more efficienct. 1.2.3 — small change to open the attachment when you use becite with [fn]. 1.2.2 — update the Scopus search tool to the newest API changes (https by default and httpAccept is required) 1.2.1 — rewrote the becite, bebib and betitle tools to perform a mutliple item search (i.e author1 + author2) and you can add an optional YEAR to refine the search. So for example [Zipser Lamme 1998] searches for references by authors (or editors) Zipser and Lamme published in 1998. Also optimised the search code (rewritten in Ruby) so now it takes much less time for large results sets. Because it is so much faster, add a new [beall] tool like betitle but to search in all database fields. For becite/betitle/beall you can now use SHIFT to open ref directly in Bookends. 1.1.0 — option to use RTF for becite/betitle temporary citations to enable bookends links copied into RTF comments/annotation aware apps like Scrivener. Added Workflow env variables citeUsesRTF to enable/disable this feature (default is disabled). Note it cannot match your font on paste of RTF, this is a limitation of RTF. 1.0.9 — V1.0.9 add new bequickadd Quick Add tool, needs BE 13.0.3+ 1.0.8 — allow author name OR editor name search for becite; better chinese author fix. 1.0.7 — try to get becite search for chinese authors to work. 1.0.6 — add betitle that searches within the reference title for a word. 1.0.5 — add ⌥ to bebib to paste pandoc footnote format. bebib formatted ref now pastes in the target app. Add environment variable to control the bibliography format for bebib.
  7. Everything else I use Python for works "better" with 3, so I'll just change the shebang for your scripts. I keep meaning to switch from Ruby to Python for my own helper tools, but never get round to it and so my Python requirements are driven only by scientific tools that recommend 3 over 2. Conda does make it easy to switch between different Python version, which is a more elegant solution (I use rbenv exactly for this in Ruby). Thanks again!!!
  8. Also thanks @vitor to the link to the older thread. I also try to keep all my scripts as physical files and not lost in the info.plist — I was a bit worried there would be a big performance penalty, but it seems that is not the case...
  9. Thank you both for the excellent detailed answers. It seems that keeping the workflow files in a /source folder in a git project, the compile workflow in root and symlinking just the source/ folder to dropbox is the best route. @deanishe: I don't use python (I have a minimal miniconda setup with V3.6.2), but did try to use your workflow-install.py and got an error: File "/Users/ian/bin/workflow-install.py", line 140, in read_plist return plistlib.readPlistFromString(xml) AttributeError: module 'plistlib' has no attribute 'readPlistFromString' No major issue, will manually symlink...
  10. Hi, if I want to develop a workflow that by default is stored in my Alfred preferences (which I keep on Dropbox), but I want to share it on Github, what would people recommend as the best setup? I could clone the github repo within the alfred workflow folder, but normally I prefer to keep all my projects in ~/Code/ — so I could maintain the github version in ~/Code/workflow-name, but develop in Alfred-prefs workflow folder, then sync the files to ~/Code/workflow everytime I'm ready to release. This seems a bit tedious. Could I symlink ~/Code/workflow-name to the Alfred-prefs-workflow folder (does the UUID name for the folder always stay the same)? Any thoughts on the best practice here? Also is there some way to "automate" building the .alfredworkflow file or is this always done manually from Alfred? Some kind of Applescript command where you would pass a bundle-ID and path to auto-build would be great. Finally, is there a downside to keeping the .alfredworkflow file in the Github directory? It seems the easiest way to do this, with the workflow source in /src/ and the workflow in / on Github?
  11. I use some automator workflows that run Pandoc and xelatex (so you need BasicTeX and Pandoc installed). A script like this should work (it does in automator anyway): #!/bin/zsh debug=0 export PATH=/Library/TeX/texbin:$PATH cd "$( dirname "$1" )" filename=$(basename "$1") if [[ $debug -gt 0 ]]; then /usr/local/bin/pandoc --verbose --latex-engine=xelatex "$filename" -o "$filename.pdf" > $$.log 2>&1 & open $$.log else /usr/local/bin/pandoc --latex-engine=xelatex "$filename" -o "$filename.pdf" fi
  12. Hi deanishe, thanks for your reply! I am somewhat confused as the Default Results shows a toggle for [x]Applescripts AND the Search Scope does show custom folders within ~/Library/ so it looks as if Alfred should be able to do this... I would argue that accessing your account Applescripts should be something Alfred should just do by default (both Quicksilver, and as I understand it Launchbar do), without having to buy the Powerpack... Thanks again.
  13. Hi, I have just installed Alfred to give it a spin (being a long time quicksilver user). By default it doesn't give me access to my Applescripts, but I thought if I enabled [x] Applescripts in Prefs⇨Default Results and dragging ~/Library/Scripts into Prefs⇨Default Results⇨Search Scope then it should index my applescripts. I've also tried adding [com.apple.applescript.script] in Advanced... But nothing comes up when I try to find trigger them with Alfred. What have I done wrong? Does Alfred require you to use Workflows to trigger Applescripts?
×
×
  • Create New...