Jump to content

iandol

Member
  • Posts

    166
  • Joined

  • Last visited

  • Days Won

    7

Reputation Activity

  1. Thanks
    iandol reacted to vitor in Bookends Tools — A curated toolset for Bookends reference manager   
    Yes.
     
     
    Every time it fires, it’ll check how long it was since the last check. If it has been longer than the defined number of days, it’ll check online to see if there’s a new version and reset the clock.
     
     
    It will download the new version in the background, but it will warn you with a notification. After it downloads the update it’ll prompt you to install, so you can accept or refuse. The downloaded Workflow will be in your Downloads directory.
  2. Like
    iandol got a reaction from Cassady in Bookends Tools — A curated toolset for Bookends reference manager   
    Haven't had a chance to play with it yet, but hopefully I'll get some time this week!!! ?
  3. Thanks
    iandol reacted to deanishe in Enabling Quicklook for Script filter entries   
    It already works with Script Filter/List Filter output. arg just needs to be something Quicklook understands, like a filepath or a URL.
  4. Thanks
    iandol reacted to vitor in Enabling Quicklook for Script filter entries   
    Script Filter JSON Format documentation. Look for quicklookurl.
  5. Thanks
    iandol reacted to deanishe in Enabling Quicklook for Script filter entries   
    Bloody hell. I completely forgot about quicklookurl!
     
    I just checked my Python and Go libraries in a panic, and fortunately, the amnesia was temporary: I've implemented quicklookurl in both.
     
    So, the skinny is: If quicklookurl is set, Alfred passes that to Quicklook. If it isn't set, Alfred passes arg to Quicklook.
     
    quicklookurl is a bit of a misnomer, as it can also be a filepath.
  6. Thanks
    iandol reacted to Tsunami in Remove individual clipboard item?   
    You can press Fn+Delete to delete invidual clipboard items.
  7. Thanks
    iandol reacted to Cassady in Bookends Tools — A curated toolset for Bookends reference manager   
    This workflow is ridiculously helpful - thank you for all the time and effort put into creating (and updating) it. Makes the interaction between Bookends and Scrivener seamless.
  8. Like
    iandol got a reaction from nav in Bookends Tools — A curated toolset for Bookends reference manager   
    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.
  9. Like
    iandol got a reaction from deanishe in Bookends Tools — A curated toolset for Bookends reference manager   
    I managed to get my Ruby rewrite nice and fast by optimising the number of times I must call bookends (I use an ASCII code 30 [\u001E] record separator). It now takes around 0.3secs, and it doesn't matter how many results are returned; for example for this large search (returns 471 records) we are clearly faster than before, and the Ruby code is much easier to maintain and modify.
     
    ./findReferencesTitle.rb "V1"  0.15s user 0.09s system 70% cpu 0.334 total
    ./findReferencesTitle.applescript "V1"  0.80s user 0.73s system 66% cpu 2.307 total
     
    findReferences.rb
     
    ---------------------------------------------------------------------------
     
    I've released a beta version of the workflow with the new faster becite/betitle/bebib tools. I've added multiple author search and an option YEAR to refine the search. So for example [friston hobson 2014] will search for references with authors "Friston" AND "Hobson" published in 2014. If someone tries this can you please let me know if it works for you...
     
    bookends-tools-beta.alfredworkflow
     
  10. Thanks
    iandol reacted to deanishe in Bookends Tools — A curated toolset for Bookends reference manager   
    There is if you're running osascript three times for every single item.
     
    Smarter to call it once for all the items and print them as tab-delimited lines, or better yet, use JXA instead of AppleScript and output JSON.
     
  11. Thanks
    iandol reacted to deanishe in Bookends Tools — A curated toolset for Bookends reference manager   
    The performance issues are down to the sheer slowness of Apple Events and inter-app communication. If your AppleScript is doing a substantial amount of communication with an application, that's 90+% of the bottleneck right there.
     
    If you're trying to talk to an app, the extra overhead of running an AppleScript as a subprocess via Ruby/Python/whatever is entirely trivial compared to the slowness of pulling stuff out of the app via Apple Events.
     
    The AppleScript JSON lib you linked to is, AFAIK, absolutely fine. But you're still writing in AppleScript…
     
    There are a few loonies who like to program in AppleScript, but the rest of us either call the smallest-possible AppleScripts from another language (and do all the interesting stuff there), or use JXA (JavaScript) instead. JXA supports JSON natively.
     
  12. Thanks
    iandol reacted to Ryan McGeary in Alfred Emoji: Search emojis by name or keyword   
    Very unlikely. I think that would violate the POLA. The default behavior of Alfred is to add items to the clipboard upon hitting [return].
     
    I suggest using a keyword snippet instead. If the workflow is instantiated from a keyword snippet, it automatically pastes.
     
     
    Yes, that already exists. Assuming that you have at least v1.6.0 installed, just set the `snippetapp` environment variable (to any value) in the workflow configuration to change the behavior to always paste the emoji character regardless of how the workflow is instantiated.
  13. Thanks
    iandol reacted to deanishe in Add Finder shortcut app folder to default search locations   
    Not really, no. Alfred simply makes clever use of macOS's (extremely powerful) search API. It doesn't cache results—the API backend does that itself. AFAIK, the only results cache Alfred maintains is for applications, so it can do its fuzzy-ish search.
  14. Thanks
    iandol reacted to Steve Ball in Cmd+Space Hotkey Activation intermittent after several minutes idle [Solution inside]   
    FIX: On the Apple discussion thread, a number of users have reported that disabling Siri solved the problem of the first activation of Spotlight being ignored (https://discussions.apple.com/thread/8148782?start=30&tstart=0)

    UPDATE: I spoke to soon, my problem is back. It's much infrequent now but I still occasionally get the problem. Bugger. Looks like I'll be switching to alt-space and will retrain my fingers.
     
     
    I've found a solution to this problem. Others have encountered the same issue with High Sierra (in their cases with Spotlight not activating):
     
    https://discussions.apple.com/thread/8148782
     
    The suggested solution was to reboot in Safe Mode (hold down Shift while rebooting) and then reboot as normal. It also seems to be advised to run EtreCheck and fix any problems it identifies.
     
    It solved my problem. Spotlight reliably starts on first press of cmd-space and I've since disabled that and assigned Alfred the key. All seems good now.
     
    Thanks, @iandol, @deanishe, @Andrew
  15. Like
    iandol reacted to deanishe in Cmd+Space Hotkey Activation intermittent after several minutes idle [Solution inside]   
    Ubuntu has always been absolutely terrible for breaking things. Desktop Linux is always buggy as hell. It seems that as soon as a desktop environment is approaching something like real stability, they throw it in the bin and start again with a shiny new, bug-riddled version.
     
    That's why I gave up on desktop Linux: I'm too old for that crap.
  16. Like
    iandol got a reaction from deanishe in Cmd+Space Hotkey Activation intermittent after several minutes idle [Solution inside]   
    @Andrew — yes i can confirm that with ⌥SPACE Alfred works OK — however years of use of ⌘SPACE mean I do not function properly without ⌘SPACE 
     
    I can only add to the voices that since I have started using macOS (~Panther), I face more stupid (and not so stupid) bugs than ever. But I'm with @deanishe in that they are still less bad than the alternatives (though the gap is diminishing, at least with windows; ubuntu 17.10 broke more things than 10.13 so the differential remains)...
     
  17. Like
    iandol got a reaction from vitor in MarkdownTransform — Convert Markdown to other formats   
    I tried in High Sierra with the system ruby, and see the same issue with the (ruby 2.3.3p222) there as well as rbenv; that a dynamically linked library libruby.2.4.2.dylib cannot be found:
    required dylib '/usr/local/opt/ruby/lib/libruby.2.4.2.dylib' not found, needed by '...Redcarpet/gems/redcarpet-3.4.0/lib/redcarpet.bundle'.  Did try: file not found '/usr/lib/libruby.2.4.2.dylib', file not found '/usr/local/lib/libruby.2.4.2.dylib', file not found '/usr/local/opt/ruby/lib/libruby.2.4.2.dylib' I don't think this is a ruby version issue, but that the redcarpet that you bundle has a specific dylib dependency that is not met. I have RedCarpet gem installed locally, but it does not get used by your workflow. I tried searching in my rbenv install for 2.4.2 and cannot find libruby.2.4.2.dylib anywhere. rbenv uses ruby-build to install a ruby from source and I don't know why this is different than the homebrewed ruby. I need to use rbenv for other things, so don't want to install a third copy of ruby with homebrew. I can stick to your old workflow.
     
    Anyway, thank you for all your excellent workflows!
  18. Thanks
    iandol reacted to vitor in MarkdownTransform — Convert Markdown to other formats   
    Ostensibly, yes. In practice, it’s failing to require in the default ruby version of Sierra. No idea why.
  19. Thanks
    iandol reacted to vitor in MarkdownTransform — Convert Markdown to other formats   
    If I make a new version, sure. As it is the Workflow is pretty much feature-complete. Unless there’s a bug that needs fixing or it breaks with a new macOS release, it’s unlikely there’ll be a new release.
  20. Like
    iandol got a reaction from bk161124 in Bookends Tools — A curated toolset for Bookends reference manager   
    This is for tool 7 (becite)? At the moment it takes the entry name and searches immediately, I'm not sure how to add a page number without interfering with the initial search. So I wonder whether I can add a (key modifier) trigger when you select an item to bring up Alfred again to enter the page number, I'll have a think about it over the weekend, any other ideas welcome 
  21. Thanks
    iandol reacted to deanishe in New AppleScript Progress Support - FYI   
    It doesn't block Alfred. Your long-running script should write its progress to a file, and a separate Script Filter then reads the file and shows the progress bar. You can open and close it as you please. 
  22. Thanks
    iandol reacted to deanishe in Best way to Develop, Build and Update a Github-based Workflow?   
    Like I say, if the "python" command on your system points to Python 3, you're going to have problems with it.
     
    Python 3 should be called "python3".
  23. Thanks
    iandol reacted to ascandroli in Menu Search   
    Hi guys.
     
    I've created a new version of this workflow with some improvements.
     
    * Instead of a keyword I'm using a hotkey to trigger the workflow. I prefer CMD+SHIFT+SPACE but this is configurable.
    * Instead of filtering in ruby I'm using Alfred's Script Filter.
    * I've upgraded menudump to support Alfred's Script Filter JSON Format (https://github.com/ascandroli/menudump)
    * I'm using the new "match" field to match against parent menus too. (requires Alfred 3.5)
     
    Using Alfred's Script Filter JSON Format makes this workflow very fast.
     
    Please take a look and let me know what you think: https://github.com/ascandroli/menudump/releases/download/1.8.0/Menu.Bar.Search-v1_8.alfredworkflow
     
    Cheers.
    Alejandro.
     
     
  24. Like
    iandol reacted to deanishe in What is your workflow for developing these workflows?   
    I symlink my own workflows. Your code belongs in version control, not in an .alfredpreferences bundle in your Dropbox.
    So that this works cleanly, for Python, I keep the actual workflow in a src subdirectory of the repo. That way, I can symlink the subdirectory to Alfred without the .git directory ending up in Dropbox, which isn't great. Also, building the workflow is as simple as zipping up the contents of the src directory. Keeps it nice and simple. When the repo root is the same as the workflow root, you have to be careful to exclude files during building. I've seen a few workflows that contained copies of themselves that contained copies of themselves that contained copies of themselves… because the author kept the built workflow alongside the source in his repo.
    With Go, because it needs compiling anyway, I write a build script that puts the completed workflow in a build subdirectory, which can then be symlinked to Alfred or (its contents) zipped into a workflow.
    I also keep all the code in external files and use Alfred's Script boxes like a shell to call the scripts. Alfred is a terrible programmer's editor, and you lose a lot of the benefits of git etc. if all your code is embedded in info.plist.
    This has the overhead of an extra bash process, but that's about 0.01s when it isn't loading your dotfiles.
    With regard to libraries like Alfred-Workflow, I don't think they're as necessary in Alfred 3 thanks to the ease of generating JSON compared to XML (at least in scripting languages). There's a lot more to AW than just generating XML/JSON, but with Alfred 2 you basically needed a library for the XML generation alone.
    Finally, I generally write my workflows as command-line programs. If you have environment variables mapped to command-line flags, you can do some really neat stuff with workflow variables.
  25. Like
    iandol reacted to deanishe in Running Applescripts in ~/Library/Scripts?   
    AFAIK, that doesn't actually matter much without a "Show System Files" setting. It definitely is a little confusing, having a "Show AppleScripts" option when Alfred won't show any AppleScripts you keep in the usual script folders, which are all in ~/Library.

    Maybe. I'd argue it's a bug more than anything, as you can't even do it with the Powerpack. You need a workflow, too, because Alfred's File Filters don't work reliably with System Files.
    I can heartily recommend the Powerpack. Worth every penny. Mind you, I'm biased because I workflow the shit out of Alfred.
×
×
  • Create New...