Jump to content

dfay

Member
  • Posts

    1,054
  • Joined

  • Last visited

  • Days Won

    62

Reputation Activity

  1. Like
    dfay reacted to corsonr in WP CLI Workflow nearly working (WordPress) ;-)   
    Hi @dfay and @smarg19,
     
    Yes it seems that you are right, after a talk on Twitter with Jonas Nordstrom (@windyjonas) I found the answer. So, I added the following lines to my myscript.sh:
     
    export PATH=/Applications/MAMP/bin/php/php5.6.1/bin:$PATH export PATH=$PATH:/usr/local/bin:/Applications/MAMP/Library/bin   And that worked. So, yes you were right, it was a matter of path.   Many thanks for your participation in this topic, it's much appreciated. If you need any help on WordPress/WooCommerce related stuff just let me know, i'll be pleased to help you ;-)
  2. Like
    dfay got a reaction from smarg19 in WP CLI Workflow nearly working (WordPress) ;-)   
    "If it works in a script but doesn't work in Alfred, it's always something about the Path settings. Every time."
     
    http://www.alfredforum.com/topic/4959-enoent-path-issues-bash-nodejs/?hl=%2Bbash+%2Bpath
     
    I'd take a look at the above - and search this forum for bash path - this comes up a lot and is probably a candidate for a FAQ.
     
    From the error message you're getting I'd be pretty sure that the script when run from Alfred doesn't know the path to wp.
  3. Like
    dfay reacted to riotbit in nethack - get information about corpes   
    nethack is an old and lovely game, but if you go through the dungeon it is hard to remember the effects of eating corpses. So i just wrote this little workflow to get this information fast.
     

     

     
    Usage
     
    Type "nhc <yourquery>" into Alfred 2.
     
    If the query matches any possible nethack corpse, values for nutrition, initial effects, final effects and intrinsics will be shown if they exist.
     
    Download
     
    https://github.com/riotbit/nethack-corpse-workflow
     
     
  4. Like
    dfay got a reaction from jsltran in Applescripts and web forms?   
    Alternatively, not that I don't love Alfred, you might consider using TextExpander: http://macsparky.com/blog/2011/9/21/web-forms-with-textexpander.html
  5. Like
    dfay reacted to fns720 in Moom and launching apps / files   
    Hi,
     
    My contribution is a script filter based workflow which collects all of your saved snapshots into a selectable Alfred list: Moom snapshots
  6. Like
    dfay reacted to deanishe in Using JavaScript for Automation   
    I was referring to the post before the post that you're referring to. The post above my post that says almost the same thing is not the post I was referring to, but rather the post before the post above my post that says almost the same thing as the post I made that isn't the post I'm referring to.
     
    It would be silly to refer to a post that said the same as the post that preceded the post I would, in this case, be referring to.
     
    Which is why I'm referring to the post I made before that post. The one that didn't say the same as the post that you think says the same as the post I'm not referring to. Which is not the post I meant.
  7. Like
    dfay reacted to mixterdee in Workflow Picker   
    Can't believe I have not used this workflow before. Thanks it is extremely helpful.
  8. Like
    dfay got a reaction from mixterdee in Workflow Picker   
    Workflow Picker
     
    Newly updated to work with Alfred 3
     
    Select from Installed Workflows
     
    I have more workflows and associated keywords and script filters than I can remember. Rather than going into Alfred’s Preferences, I wanted a quick way to see the keywords & script filters available in the workflows I have installed, (optionally) grouped by the categories that have been available since Alfred 2.2. Inspired by Shawn Rice’s Workflow Help workflow and deanishe’s Appscript workflow, I put this together.
     
    There are five keywords:
    wfa - List all installed keywords/script filters wfp - Select a category to list keywords/script filters wfc - List keywords/script filters within a category alphabetically wfg - List keywords/script filters within a category, grouped by workflow hot - List all hotkeys (this does not execute the hotkey - it’s just a way of seeing them all, and potential hotkeys which have no key assigned)  
    By default, wfp outputs to an Applescript which calls wfc on the selected category. This can easily be changed in the workflow layout in Alfred Preferences to call wfg instead.
     
    Alfred 3 compatible version hosted at
    https://www.dropbox.com/s/14sxodqbyoqa74n/Workflow Picker 3.alfredworkflow?dl=0
     
    Details to manually update for Alfred 4 are further along in this thread....
     
    Version History:
    2014–05–13: initial release 2014–05–15: 1.01 updated to make sure prefs.plist file with categories exists 2014–05–15: 1.02 added wfa, updated prompts 2014-05-20: 1.03 added hot 2014-05-22: 1.04 updated to make afp and hot filter by query 2016-05-20: 3.0 updated for Alfred 3  
  9. Like
    dfay reacted to ctwise in New AppleScript Progress Support - FYI   
    Just noticed this after installing Yosemite:
     
    Progress Reporting AppleScript now has built-in support for reporting progress in a script. The global AppleScript object has four new properties:
    progress total steps (an integer)
    progress completed steps (an integer)
    progress description (text)
    progress additional description (text)
    A script may set any of these properties at any time during the script to update the progress display. progress completed steps divided by progress total steps provides the fraction completed; if completed or total is -1, progress is considered indeterminate. progress description and progress additional description provide a message about what the script is doing.
    Exactly how the progress is displayed depends on how the script is run: in Script Editor, it appears in the script window’s status bar; in script applications (applets), it appears as a progress dialog; and for scripts run from Script Menu, it appears in the Script Monitor menu. (Script Monitor appeared in previous system releases, but was only used for Automator workflows; it now displays any script run using NSUserScriptTask, which includes anything run from Script Menu.)
       
  10. Like
    dfay reacted to deanishe in [REQUEST] Anki Workflow to Create Cards   
    I don't use Anki (the price of the app on iOS is ridiculous), but I use flashcards a lot (I had about 10,000 last time I looked).
     
    What I do is create the lists as TSV (tab-separated) files in a text editor and have a script to convert the TSV files into an importable format, e.g. .studyarchive files for Mental Case or a differently-formatted TSV for Flashcards Deluxe.
     
    It's hard to imagine a more efficient input interface than an editor, and I think it'd be a better investment of time creating a syntax definition for an editor than trying to coerce Alfred into working as a flashcard editor.
  11. Like
    dfay reacted to Vero in Multisearch - searching with many search engines   
    dfay has provided a good example workflow You can also take a look at the workflow examples, which you can access in the Workflow preferences by clicking on the + at the bottom of the sidebar and choosing "Examples".
     
    The "Should I watch this movie?" workflow will show you how you can launch a search for a movie title in your default browser to imdb.com and rottentomatoes.com, as well as YouTube in Chrome so that you can watch the movie trailer (useful if you don't have Flash otherwise installed on your Mac). From dfay's example or the movie workflow, you can replace or modify the objects to launch the searches you want
  12. Like
    dfay reacted to Marcin Bogdanowicz in Multisearch - searching with many search engines   
    thank you so much dfay and Vero, you are awesome, especially dfay deserves credits for his link to absolutely accurate workflow!
     
    By the way, I think it would be useful for others if you, Vero, pasted in the link to the workflow you've mentioned. It sounds very like that of dfay's example, but may have also a specific ring of relevance for somebody. Perhaps it sounds like asking to much, but please understand that for a Newbie like me the title of a workflow is sort of a mystery when it comes to localise it as much as many other things with Alfred app.
  13. Like
    dfay got a reaction from frankspin in Alfred/Workflows for teachers   
    I am a college professor, and most of my use of Alfred is for research / bibliographical / writing purposes, but I have a workflow that I update / duplicate each quarter to automatically open materials related to whatever course I am teaching.  Overall it looks like this:
     
    Keyword (some abbreviation for the course)
    -->
    Multiple Files - this launches all the folders with my syllabus, grade books, slides, slides from previous versions of the course that I may be cutting/pasting from, etc.
    --> 
    Run Script - this is an Applescript with two parts:
    1) open my current syllabus and automatically go to the date of the next upcoming class - you can find this here: https://github.com/derickfay/course-creator
    2) arrange the files / windows that I just opened according to a corresponding Moom ( http://manytricks.com/moom/ ) template
     
    I also use my Keynote to PDF workflow (linked from http://dfay.fastmail.fm.user.fm/alfred/ also in these forums somewhere) after every class to prepare my slides for posting to course web sites.
     
    None of these are particularly tied to Alfred - they could all be accomplished by independent Applescripts, but Alfred 1) makes them readily available and 2) with Dropbox syncing, makes them available on all three Macs that I use on a regular basis without worrying about syncing Library or other script folders.
  14. Like
    dfay got a reaction from timmorrisdesign in Reveal current open Microsoft Word Document (2011 version) in Finder with HotKey   
    I got this to work by changing the Run NSAppleScript to the less foolproof but working:
     
    on alfred_script(q)
    tell application "Microsoft Word" to set documentName to path of active document as alias tell application "Finder" to open the container of documentName end alfred_script   the other code that I deleted from Shawn's version was checking if Word was active but in my testing it never returned True, so it never actually ran the two tell statements above.
  15. Like
    dfay reacted to raguay.customct in Text Case Converter in Swift   
    The tutorial on this workflow is now available: https://computers.tutsplus.com/tutorials/alfred-workflows-in-swift--cms-21807
     
    The compiling instructions inside the workflow are more accurate now with the latest versions.
  16. Like
    dfay got a reaction from Terry T. in Case Converter (including Title Case) - now working on MacOS 12.3   
    Updated March 26, 2022 to use Python 3 for MacOS 12.3 
     
    Now featuring Universal Action triggers and hotkeys for the following five actions:
     
    Uppercase
    Lowercase
    Capitalize - capitalizes all words (e.g. Posting A New Topic In Share Your Workflows)
    Title Case - capitalizes word except for "the", "in", "of" etc. according to American English title conventions (e.g. Posting a New Topic in Share Your Workflows)
    Sentence Case - capitalizes only the first letter of the first word & converts the rest to lower case
     
    All of these are set to Copy to Clipboard and Paste by default.
     
    There's also a script filter cc which lets you view the query converted and select your choice (like the Code Case workflow).
     
    You can also connect a hot key directly to the cc script filter directly to view the output options without typing the cc command and pasting your text.
     

     
    Download:
     
    https://www.dropbox.com/s/8fydkkef1t699et/Case Converter 3.alfredworkflow?dl=0
     
    NB This is a new link and will download as a new workflow - you'll need to migrate any hotkeys and delete or disable the older version.
     
    Here's the old Python 2 version in case anyone wants it:
     
    https://www.dropbox.com/s/3k2lh21g5wnqrkp/Case Converter 2.alfredworkflow?dl=0
     
    The original version is described below and still available, if anyone prefers it.
     
    Workflow Version:
     
    This workflow converts the case of the text on the clipboard.
     
    http://dfay.fastmail.fm/alfred/Case%20Converter.alfredworkflow
     
    There are two workflows which display the following five options:
     
    Uppercase
    Lowercase
    Capitalize - capitalizes all words (e.g. Posting A New Topic In Share Your Workflows)
    Title Case - capitalizes word except for "the", "in", "of" etc. according to American English title conventions (e.g. Posting a New Topic in Share Your Workflows)
    Sentence Case - capitalizes only the first letter of the first word & converts the rest to lower case
     
    The keyword case will transform the text on the clipboard without pasting the result.
    The keyword casep will transform the text on the clipboard and paste (using Applescript System Events)
     
    Hotkey Version:
     
    Here is a version for use with hotkeys which will operate on the active selection in OS X and paste it with the converted text.  These all have a half second delay prior to pasting, which is necessary for Applescript to be able to paste.
     
    http://dfay.fastmail.fm/alfred/Case%20Hotkeys.alfredworkflow
     
    Notes and Revision History:
     
    These use the Title Case perl script found at https://raw.github.com/ap/titlecase/master/titlecase .
     
    If you manage academic citations with BibDesk, Zotero, Papers, Mendeley, etc., Title Case conversion is especially useful for cleaning up downloaded citations.
     
    Updated May 3, 2013 with nicer colored icon thanks to mjv ( http://www.alfredforum.com/user/4384-mjv/ )
     
    Updated February 5, 2014 to handle Sentence Case and to add a second keyword to paste after conversion.
     
    Updated May 20, 2014 with hotkeys
  17. Like
    dfay reacted to smarg19 in Snippets: On-the-fly text expansion   
    Good tweaks. I actually have a TextExpander snippet for the snippet dictionary creation. You are correct tho, Snippets allows for multiple dictionaries. In fact, there are two possible types:
    single item ^^^key: value^^^ multiple items ^^^ key1: value1 key2: value2 ^^^ And you can mix and match in whatever way is simplest in the moment. You are correct about the how it manages conflicts. There's really no simple way around this tho.I love the idea of adding the dictionary creation to the workflow itself tho. I'm going to "steal" that idea
    The other addition makes sense too. I actually think that I should split the keyboard shortcut from the keyword. Then this would work seamlessly. As it stands, if I added those lines to the single Run Script and you use the keyboard shortcut, things will get a bit odd (and slower).
    So, all that to say, let me throw together a 1.1
    stephen
  18. Like
    dfay reacted to smarg19 in Snippets: On-the-fly text expansion   
    UPDATE
    Inspired by @dfay, I've added some functionality for Version 1.1. Downloand or update from Packal.
  19. Like
    dfay got a reaction from cocoaaa in PDF Reading List   
    This is a bit of an aside - let me take off the Alfred hat and put on the professor hat for a minute....
     
    I wouldn't go near DevonThink - it's overkill for bibliographies on one hand, and it doesn't have the library/database integration that dedicated bibliographic software has.
     
    But I'd also never try to manage PDFs just with the file system.  I have about 5000 PDFs indexed in a library in BibDesk (even though I don't write in BibTeX) that originally began 20 years ago as a 400-item Paradox database (in the days of WordPerfect) when I was a 1st year grad. student.  If you are serious about an academic career, you should be using some bibliographic management software -- if I were to start now, I might do it in Zotero rather than BibDesk but the formats are generally exportable/importable relatively easily (see http://en.wikipedia.org/wiki/Comparison_of_reference_management_software ).  The sooner you start doing it, the better - right now you may have one list that you want to maintain of things to read, but soon enough you will have lists by courses you are taking and/or teaching, for comps, for research proposals, articles, thesis, second book, etc.  And a lot of your PDFs are going to belong in more than one of those places.  If you're annotating your PDFs, you don't want multiple copies...so you can create aliases (and now tags, which helps but doesn't solve all the problems) in the file system.
     
    So for keeping a reading list -- my BibDesk library at the moment has about 10 static folders titled "_current.project_name" for various articles and book chapters.  Each of those has the full biblio for the selected project.  Publications are tagged "to read" if I haven't read them.  So depending on the project I am working on, I can filter the project biblio by the tag "to read."  And this is all exposed to Applescript (one of the great things about BibDesk).  So -- say you have set up a smart group for all of the publications you have added in the last month, and those are what you want to be reading from -- you could put this script in an Alfred workflow:
     
    tell application "BibDesk"
     
    activate
     
    tell document 1
    select group "added in last month"
    select (search for "to read")
    end tell
    end tell
     
    and it would automatically give you your reading list.  Yes, you could do this with smart folders and Mavericks tags, but when the day comes that you want to write and cite some of the documents you've been reading, having it all indexed in biblio. software will make it much less painless.  Especially if you are submitting to journals with different citation formats.  It may seem like more work up front, but Google Scholar and all of the big academic databases let you download the citation info.  If I am going to read something related to my research, chances are it's worth being able to find it again, so it's worth the minute or two that it takes to get it into the database up front.  Just start with what you are currently reading, then you can catch up on the rest later.
     
    Also...looking at your 1st post - with BibDesk at least the PDF files can remain exactly where they are, and you can set it up to auto file new PDFs according to a customizable naming convention - mine are filed in folder by first letter of author's last name, then author date title.pdf .  So everything is still easily findable if you're not using your biblio software.
     
    Anyway, there's my unsolicited advice - same advice I give my grad. students - the long-term payoff is greater & the work is less the sooner in your career you start using biblio. software.
  20. Like
    dfay got a reaction from Easytiger in PDF Reading List   
    This is a bit of an aside - let me take off the Alfred hat and put on the professor hat for a minute....
     
    I wouldn't go near DevonThink - it's overkill for bibliographies on one hand, and it doesn't have the library/database integration that dedicated bibliographic software has.
     
    But I'd also never try to manage PDFs just with the file system.  I have about 5000 PDFs indexed in a library in BibDesk (even though I don't write in BibTeX) that originally began 20 years ago as a 400-item Paradox database (in the days of WordPerfect) when I was a 1st year grad. student.  If you are serious about an academic career, you should be using some bibliographic management software -- if I were to start now, I might do it in Zotero rather than BibDesk but the formats are generally exportable/importable relatively easily (see http://en.wikipedia.org/wiki/Comparison_of_reference_management_software ).  The sooner you start doing it, the better - right now you may have one list that you want to maintain of things to read, but soon enough you will have lists by courses you are taking and/or teaching, for comps, for research proposals, articles, thesis, second book, etc.  And a lot of your PDFs are going to belong in more than one of those places.  If you're annotating your PDFs, you don't want multiple copies...so you can create aliases (and now tags, which helps but doesn't solve all the problems) in the file system.
     
    So for keeping a reading list -- my BibDesk library at the moment has about 10 static folders titled "_current.project_name" for various articles and book chapters.  Each of those has the full biblio for the selected project.  Publications are tagged "to read" if I haven't read them.  So depending on the project I am working on, I can filter the project biblio by the tag "to read."  And this is all exposed to Applescript (one of the great things about BibDesk).  So -- say you have set up a smart group for all of the publications you have added in the last month, and those are what you want to be reading from -- you could put this script in an Alfred workflow:
     
    tell application "BibDesk"
     
    activate
     
    tell document 1
    select group "added in last month"
    select (search for "to read")
    end tell
    end tell
     
    and it would automatically give you your reading list.  Yes, you could do this with smart folders and Mavericks tags, but when the day comes that you want to write and cite some of the documents you've been reading, having it all indexed in biblio. software will make it much less painless.  Especially if you are submitting to journals with different citation formats.  It may seem like more work up front, but Google Scholar and all of the big academic databases let you download the citation info.  If I am going to read something related to my research, chances are it's worth being able to find it again, so it's worth the minute or two that it takes to get it into the database up front.  Just start with what you are currently reading, then you can catch up on the rest later.
     
    Also...looking at your 1st post - with BibDesk at least the PDF files can remain exactly where they are, and you can set it up to auto file new PDFs according to a customizable naming convention - mine are filed in folder by first letter of author's last name, then author date title.pdf .  So everything is still easily findable if you're not using your biblio software.
     
    Anyway, there's my unsolicited advice - same advice I give my grad. students - the long-term payoff is greater & the work is less the sooner in your career you start using biblio. software.
  21. Like
    dfay reacted to deanishe in Recommendations for Sharing Workflows   
    Not sure if this is quite the right thread, but if you're distributing a workflow written in Python, *do not* ask users to install Python libraries in the system Python. Bundle them with your workflow.
    It's not ideal, but installing libraries into the system Python is very bad form. The chances are good that you'll break some other software doing the same naughty thing—or it will break your workflow—by installing an incompatible version of a library.
    It's trivial to install libraries directly in your workflow with "pip install --target=my/workflow/dir". Do that instead.
    In addition, bundling the libraries with your workflow means the workflow will sync across machines without problems.
  22. Like
    dfay got a reaction from 40-02 in New workflow: Convert currencies in Alfred   
    Have you seen Units? http://www.alfredforum.com/topic/2471-workflow-units-convert-currency-length-temperature-weight-and-more/
  23. Like
    dfay got a reaction from thec13 in Case Converter (including Title Case) - now working on MacOS 12.3   
    Updated to add a version set up for use with hotkeys.
  24. Like
    dfay reacted to politicus in How to make these case converter Perl scripts work in Alfred.   
    YOU ARE THE MAN. 
     
    I think I will use this workflow at least 50 times a day!
     
    Thank you 
  25. Like
    dfay got a reaction from katie in Workflow Picker   
    Workflow Picker
     
    Newly updated to work with Alfred 3
     
    Select from Installed Workflows
     
    I have more workflows and associated keywords and script filters than I can remember. Rather than going into Alfred’s Preferences, I wanted a quick way to see the keywords & script filters available in the workflows I have installed, (optionally) grouped by the categories that have been available since Alfred 2.2. Inspired by Shawn Rice’s Workflow Help workflow and deanishe’s Appscript workflow, I put this together.
     
    There are five keywords:
    wfa - List all installed keywords/script filters wfp - Select a category to list keywords/script filters wfc - List keywords/script filters within a category alphabetically wfg - List keywords/script filters within a category, grouped by workflow hot - List all hotkeys (this does not execute the hotkey - it’s just a way of seeing them all, and potential hotkeys which have no key assigned)  
    By default, wfp outputs to an Applescript which calls wfc on the selected category. This can easily be changed in the workflow layout in Alfred Preferences to call wfg instead.
     
    Alfred 3 compatible version hosted at
    https://www.dropbox.com/s/14sxodqbyoqa74n/Workflow Picker 3.alfredworkflow?dl=0
     
    Details to manually update for Alfred 4 are further along in this thread....
     
    Version History:
    2014–05–13: initial release 2014–05–15: 1.01 updated to make sure prefs.plist file with categories exists 2014–05–15: 1.02 added wfa, updated prompts 2014-05-20: 1.03 added hot 2014-05-22: 1.04 updated to make afp and hot filter by query 2016-05-20: 3.0 updated for Alfred 3  
×
×
  • Create New...