Jump to content

derico

Member
  • Posts

    25
  • Joined

  • Last visited

Reputation Activity

  1. Like
    derico reacted to eightygrit in Recent Items 4.3 beta 2 for Alfred 4: Finder Recent Items   
    I just want to offer a quick solution for anyone who happens to share my particular situation and is having trouble with this workflow. This only applies to you if you did a fresh install of Alfred 4 (the app, we aren't talking about your license) rather than an upgrade from Alfred 3. 
     
    I got a new mac and used it as a chance to do a fresh install of Alfred 4, which keeps workflows in a different directory than before, breaking several workflows that used to work just fine.
     
    Alfred 3 files:
    ~/Library/Application Support/Alfred 3 Alfred 4 files:
    ~/Library/Application Support/Alfred  
    ℹ️NOTE: If your computer already has the Alfred 3 directory, this solution is NOT for you.
     
     
    This workflow (and probably others like it) is using a hard coded path to the Alfred 3 directory and failing because it doesn't exist. 
     
    Fortunately the solution is quite simple. Open terminal and type the following command, AFTER you replace both instances of `USERNAME` with the name of your home directory.  Only use absolute paths for creating a symlink. 
     
    ln -s "/Users/USERNAME/Library/Application Support/Alfred" "/Users/USERNAME/Library/Application Support/Alfred 3" * Never trust code you get from strangers on the internet. Know your system. Know the command you're using. Don't use it if you aren't sure.
     
     
    Press [Enter] after you enter the command in terminal. If it looks like nothing happened in terminal, you did it right. Yay!  If you see a message, it's probably an error message, and ... you're on your own. 
     
    Hopefully this helps someone else.
     
    @Carlos-Sz - Thanks for the great workflow. It's easily one of my most used. 
     
    Cheers!
  2. Thanks
    derico reacted to deanishe in Handling workflow/environment variables   
    Note: This post is out of date as of Alfred 3.6 (which introduced AppleScript functions to set and remove variables).

    There is an updated version on my own site: Workflow/environment variables in Alfred.

    This post will not be updated due to the difficulty of editing complex posts using the forum software. Sorry.
     
     
    This is a brief look at how to get, set and save variables in code (i.e. in Script Filters, Run Script Actions, etc.).

    In Alfred 2, you had one single variable to work with: the {query} macro. Alfred 3 adds the ability to specify as many variables as you want. Alfred's own help provides a great description of working with variables in Alfred's own UI. I'm going to look more closely about getting and setting workflow/environment variables in your own code within a workflow.

    First of all, it bears mentioning that all variables are strings. Sure, you can set a variable to a number in JSON, but when it reaches your next script or one of Alfred's Filter Utilities, it will be a string. If you set a variable to an array (e.g. [1, 2, 3, "mach dat Mäh mal ei"]), Alfred will turn it into a single, tab-delimited string ("1\t2\t3\tmach dat Mäh mal ei").

    Setting variables

    There are several ways to set variables. The most obvious ones are in the Workflow Environment Variables table in the workflow configuration sheet and using the Arg and Vars Utility. The configuration sheet is largely without magic, but in an Args and Vars Utility, you can use variable expansion macros: {query} expands (as always) to the input (which may be a user-entered query or the output from a previous Action), and you can use {var:VARIABLE_NAME} macros for your own custom variables.  This is described in detail in the above-mentioned help pages.

    More interestingly, you can also set variables via the output of your scripts (i.e. dynamically) by emitting appropriate JSON. How you set variables depends on whether you are using a Script Filter or a Run Script action.

    You must use the appropriate mechanism, or it won't work.

    From Run Script actions

    Let's say your script outputs a URL, e.g. https://www.google.com. Normally you just do print('https://www.google.com') (or echo or puts) and that gets passed as the input to the next action. To also pass variables, you instead emit JSON in a very specific format:
    {"alfredworkflow": {     "arg": "https://www.google.com",     "variables": {"browser": "Google Chrome"}}} The root alfredworkflow object is required. If it's missing, Alfred won't parse the JSON, but will pass it as-is as input to the next action (which can also be very useful). Your output (i.e. the next Action's input/{query}) goes in arg, and any variables you wish to set go in the variables object.

    From Script Filters

    You can also set workflow variables via Script Filter feedback at three different levels: the root level, the item level and the modifier level. (Note: This only applies to JSON feedback; XML feedback is now deprecated and does not support the features described here.)

    In each case, variables are set via a variables object at the appropriate level (feedback root, item or mod).

    Root-level variables

    Root-level variables are always passed to downstream elements regardless of which item is actioned. They are also passed back to the same Script Filter if you've set rerun, so you can use root-level variables to implement a progress bar.

    browser is set to Safari for all items:
    {"variables": {"browser": "Safari"},  "items": [{"title": "Google",    "arg": "https://www.google.com"}]}
    Item-level variables

    Item-level variables are only passed downstream when the item they're set on is actioned, and they override root-level variables. Root-level variables are also passed downstream when you action an item.

    browser is set to Safari by default, but Google Chrome for Reddit:
    {"variables": {"browser": "Safari"},  "items": [    {"title": "Google",      "arg": "https://www.google.com"},    {"title": "Reddit",      "arg": "https://reddit.com",      "variables": {"browser": "Google Chrome"}}]}
    Modifier-level variables

    Modifier-level variables are only passed downstream when the corresponding item is actioned with the appropriate modifier key pressed. They replace item- and root-level variables (i.e. if a modifier sets any variables, Alfred ignores any root- and item-level variables).

    As above, browser is set to Safari by default and Google Chrome for Reddit. But you can also pass browser=Google Chrome for Google by holding ⌘ when actioning it:
    {"variables": {"browser": "Safari"},  "items": [    {"title": "Google",      "arg": "https://www.google.com",      "mods" {"cmd": {"variables": {"browser": "Google Chrome"}}}},    {"title": "Reddit",      "arg": "https://reddit.com",      "variables": {"browser": "Google Chrome"}}]}
    Using variables

    So you've set a few variables, and now you want to use them. Within Alfred elements like Arg and Vars or Filter Utilities, you use the above-mentioned {var:VARIABLE_NAME} macros. Very simple.

    Where it gets a little more complicated is in your own code. First and foremost, {var:VARIABLE_NAME} macro expansion does not work in Run Script Actions (or Run NSAppleScript).

    When Alfred runs your code, it does not use {var:...} macros, but rather takes any workflow variables and sets them as environment variables for your script. Using the above example again, Alfred would pass "https://www.google.com" to my script as input (either via ARGV or {query} depending on the settings) and it would set the environment variable browser to Safari or Google Chrome. How you retrieve environment variables depends on the language you're using.

    Accessing environment variables in different languages

    In bash/zsh, the variables are already in the global namespace. Just use $browser

    In Python, use the os.environ dictionary or os.getenv('VARIABLE_NAME'):
    import os browser = os.environ['browser'] # Or browser = os.getenv('browser')
    In AppleScript, use system attribute:
    set theBrowser to (system attribute "browser")
    In JavaScript (JXA), use $.getenv():
    ObjC.import('stdlib') var browser = $.getenv('browser')
    In PHP, use getenv():

    (Please see this comment by juliosecco on why you should use getenv() over $_ENV.)
    $browser = getenv('browser'); // Or $browser = $_ENV['browser'];
    In Ruby, use ENV:
    browser = ENV["browser"]
    Saving variables
     
    NOTE: This section is out of date as of Alfred 3.6. Please see the updated version linked at the top of the post.
     
    As amoose136 points out, any variables you set in a running workflow are not saved. They exist as long as the workflow is running and then disappear. Any Workflow Environment Variables will "reset" to their values in the workflow configuration sheet on the next run.

    Generally, this is what you want, but sometimes you want to save a variable's value. For example, you might have an API_KEY Workflow Environment Variable in the configuration sheet. The user can enter their API key for the service in the configuration sheet, but you'd also like to add the ability to set it from within your workflow, e.g. with a setapikey Keyword and corresponding Run Script action.

    WARNING: As of Alfred 3.4.1, Alfred takes several seconds to notice when info.plist has been updated by something other than itself. As a result, relying on altering info.plist programatically can be problematic, as Alfred won't notice the changes for several seconds (5–10 seconds is typical on my machine). If you update a workflow variable in info.plist and run your workflow again immediately, it is unlikely that Alfred will have picked up the change.

    The Workflow Environment Variables are contained in the variables section of info.plist. Consequently, to update them, you need to update info.plist.

    Regardless of which language you're using, you can call the PlistBuddy program to alter Workflow Environment Variables:
    # Set a variable /usr/libexec/PlistBuddy -c "Set :variables:API_KEY \"ABC-XYZ\"" info.plist # Delete a variable (i.e. remove it entirely from Workflow Environment Variables) /usr/libexec/PlistBuddy -c "Delete :variables:API_KEY" info.plist
    In Python, there's no need to use an external program, as it has the built-in plistlib library:
    from plistlib import readPlist, writePlist # Read info.plist into a standard Python dictionary info = readPlist('info.plist') # Set a variable info['variables']['API_KEY'] = 'ABC-XYZ' # Delete a variable del info['variables']['API_KEY'] # Save changes writePlist(info, 'info.plist')
    (Note: plistlib only works with XML property lists, which is fine for info.plist, but using PlistBuddy is generally more robust.)

    Don't forget: any changes you make to info.plist only take effect the next time the workflow is run. This likely doesn't matter in most cases, but if you need a variable to be updated immediately (i.e. also for the current workflow run), you must also set it "live" using one of the methods described in the Setting variables section above.

     
  3. Like
    derico reacted to Carlos-Sz in Evernote Workflow 9 beta 4 (Alfred 4)   
    Evernote 8.0 is out!
     
    Thank you all for the great feedback.
     
    What’s new?
    New syntax to create a note: @notebook #tag1 #tag2 !reminder :Title Select tags and a notebook from a list or type them when searching or creating a new note Create one note for each Finder selected file Create a note from current Safari or Google Chrome URL Keyword enu to search notes with a source URL (default action is to open the URL instead of the note itself) Keyword enr to search and handle due/overdue reminders Keyword entodo to search to-do notes keyword enrec to search notes updated within a week Search with a selected notebook and multiple selected tags at the same time e.g. ens @notebook #tag1 #tag2 :my query Set a reminder (option key) Open note URL (function key) Append text or file(s) selected in Finder to a note from search feature (command key) Append file(s) from Finder Several improvements Bugs fixed  
    Download Now
  4. Like
    derico got a reaction from Carlos-Sz in Evernote Workflow 9 beta 4 (Alfred 4)   
    Hey Carlos,
     
    thanks for this great update to an incredible useful workflow!
    I have not tried the new to-do and reminder features, since I do not use them in Evernote either. But to be able to open a note's URL is very nice.
     
    I was taken aback finding the sync feature not working. Nothing was happening and I found following message in the Console:
    .com.runningwithcrayons.Alfred-2: execution error: The variable synchronize is not defined. (-2753) This could be caused by having renamed the Evernote application, I thought. And sure enough, triggering the sync works when using the bundle identifier.
    tell application id "com.evernote.Evernote" to synchronize  
    So may I suggest using the bundle ID "com.evernote.Evernote", instead of the name?
    This way the Apple Scripts will work no matter the app's actual name.
     
    Ricco
  5. Like
    derico reacted to Carlos-Sz in Evernote Workflow 9 beta 4 (Alfred 4)   
    Version 7.91 is out

    Hold option key to set a reminder (keywords ens, ent, enr, enm or end)
    keyword end (display to-do notes)
    Keyword enm (display reminder notes)
    keyword enu (open note URL instead of note itself)
    Several improvements
    Bugs fixed
    Removed Alleyoop support
     

    Note: this is the first version that starts to handle Reminders. The keyword enm will list all due reminders. You can select a note and press Command key to set the note status reminder to Done.

     

    This is a workflow version 8 pre-release. Please test the new set reminder feature and give some suggestions before the final version. Thanks.

     

    Download

     



  6. Like
    derico reacted to vitor in New Path — Make new files and folders in the current Finder location   
    Call nf followed by a file name (if no extension is given, .txt will be used) to make a new file. Calling nfo instead will open the files after creation.

    nd and ndo behave similarly, but for directories. Two important diferences: no extension is added, and subdirectories can be created with /.

    If a Finder or Path Finder window is the frontmost window, the new paths will be created there, otherwise they will be created on the Desktop. Use | to separate the names of multiple entries (surrounding spaces will be trimmed).



     
    Download | Source
  7. Like
    derico reacted to Benzi in BulkRename - bulk rename your files, with built-in and custom presets   
    Here is a workflow for bulk renaming files.
     

     
    You select some files either in Alfred using the File Navigator or the File Buffer and use the File Action called "Rename with BulkRename", or select the files in Finder and use the hotkey to trigger the workflow for the selected files.
     
    Once triggered, Alfred will display a preview option and a bunch of preset actions that you can select. The preview option will display the modifications that will be made for each preset action listed.
     
    Preview
     
    Here are a couple of snapshot portions of what you see when pressing the Shift key:
     

     
     

     

     
    Issues are highlighted so that you know if running a preset will work or not. Even if you run that preset, nothing will happen.
     
     
    Preset Actions
     
    There are 6 actions included as a sample, but you can easily create your own actions using the .list keyword.

     
    To create a new preset, type in .list <new name>. Delete a preset using Cmd+Enter
     
    Each preset is nothing but a collection of simple steps that help make the preset action possible. For e.g. when you select the Append Sequence Number preset, you will be shown the preset editor:

    What the above tell is that the Append Sequence Number preset is a collection of two steps:
     
    add text '_seq' at end add number from 0, at end There are added to the preset using any of the steps [+] listed.
    You can add any number of steps to a preset, even the same ones over and over.
    You can delete an added step using Cmd+Enter
     

    When you add a new step to a preset, or edit an existing step by selecting it, you will be shown the Step Node Editor as above. The above is the example for the "Number Sequence" step, and for this step you can control what the starting number is, where the number should be added, and the format (leading zeros to be added). Items with a arrow -> are variables that you can change by pressing the Tab key. To add the step, just select the first option, and that step will be added to the Preset that you were viewing before.
     
    Steps
    Steps are the building blocks of each preset, and currently BulkRename has the following:
    Find and replace: find text and replace with another, supports regex and plaintext, case sensitive and insensitive Add text: add some text at the beginning or end of the filename Add timestamp: add a timestamp at the beginning or end of the filename. Timestamp is one of current time, file created or modified time. YYYY,YY,MM,DD,hh,mm,ss can appear in the format string Convert case: switch the case of the filename to lower, upper, or title Strip text: remove x characters from the filename either at the start of end Number sequence: append a running number sequence, starting from a value that you can specify MP3 Tagger (beta): Extract MP3 tags from MP3 files Regex group extractor: Regex group pattern extractor Change Extension: Allows you to change the extension of a file  
    Keywords
    The main keyword is .rename (but you would not have to type that in if you use the File Action or the Hotkey) The second one to manage all your presets is .list. .preset and .node are keywords used by the workflow directly, and there is usually no need for you to type those in directly. Download
    Download from here  
    Notes
    This works with Python 2.7.2 last I checked  
    Have a look at the included sample presets using the .list keyword to get a hang of how presets are made, and then create your custom ones 
  8. Like
    derico reacted to Benzi in BulkRename - bulk rename your files, with built-in and custom presets   
    Added:
    Step to change the file extension Alleyoop support
  9. Like
    derico reacted to zhaowu in Top Processes Based Memory or CPU Usage Workflow   
    Alfred 2 Top Process Workflow
      The initial motive of this workflow is to avoid frequent visits to the Activity Monitor when the fan goes loud. Now it has been evolved with two major features:   Suggestions are welcome. And Please go to http://zhaocai.github.com/alfred2-top-workflow/ for better view of the installation instruction.   - 1) List/Kill Top Processes by Memory/CPU/IO Usage       - 2) (working in progress) Get a glance of system status including internal battery, fan speed, CPU/GPU Temperature, bluetooth battery, disk capacity, etc.     Usage   0. Show Help   Just type -?, -h, or --help after the keyword to show help.     1. Top Processes   A. Keywords:   1.) top: Show a mixed processes list based on top cpu/memory usage.          1. top -m, top --memory to show processes ranked by memory usage        2. top -c, top --cpu, to show processes ranked by cpu usage        3. top -i, top --io, to show processes ranked by io usage with callback from top io trace collector.      Top IO requires [DTrace][Dtrace] and it would take a while to finish. The new callback design is to run the job in he background and post a notification (OSX 10.8+) using notification center. Click on the notification to show the result in alfred.           Modifier Key      - none    : The default action is to list files opened by process ID    - control : Kill the selected process    - command : kill forcefully (kill -9)    - alt     : Nice (lower) the selected process's cpu priority    - shift   : Search web for process information     2.) kill: Filter process to kill.   Modifier Key      - none: The default action is to kill by process ID    - command : kill forcefully (kill -9)   3.) lsof: List files opened by process id   Modifier Key      - none: The default action is to reveal file in Finder   B. Filter by Query   1.) To search for process state, use :idle, :sleep, :stopped, :zombie, :uninterruptible, :runnable, etc.       2. Glance an Eye on your system   #### A. Keywords:   glance: Show system information including internal battery, bluetooth battery, disk capacity, etc.       B. Change Display Order   Activate Alfred Preferences → Advanced → Top Result Keyword Latching       Hit Enter for the feedback item you wish to show up on the top.     Installation Two ways are provided:
    You can download the Top Processes.alfredworkflow and import to Alfred 2. This method is suitable forregular users.
    You can git clone or fork this repository and use rake install and rake uninstall to install. Check rake -T for available tasks. This method create a symlink to the alfred workflow directory: "~/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows". This method is suitable fordevelopers.
        Troubleshooting   1. Does not work in Mac OSX 10.9 (Maverick)   In OSX 10.9, the system ruby is upgraded to 2.0.0. You need to download the new version of this workflow which packs the ruby gems for 2.0.0 inside.   If the downloaded version does not work, try    1.) open Terminal.app. If you use rvm or rbenv, switch to the system ruby. run cd "$HOME/Library/Application Support/Alfred 2/Alfred.alfredpreferences/workflows/me.zhaowu.top" && rake bundle:update   2. iotop causes mouse lagging   This issue is not caused by this workflow but by [DTrace][DTrace]. The related system log message is IOHIDSystem cursor update overdue. Resending.. In my Macbook Pro, any [DTrace][DTrace] based program will introduce this issue including the mac built-in /usr/bin/iotop, and /Applications/Xcode.app/Contents/Applications/Instruments.app .   I upgrade to OS X 10.9 and this issue is resolved.   3. Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8   Add the following contents to /etc/launchd.conf. Restart is required.   setenv LANG en_US.UTF-8 setenv LC_ALL en_US.UTF-8      
  10. Like
    derico reacted to Carlos-Sz in Evernote Workflow 9 beta 4 (Alfred 4)   
    Alfred 4
    Read about this workflow below.
     
    This is an update to address the new Alfred 4 data folder (thanks to xilopaint).
    DOWNLOAD Evernote Workflow 9 beta 4 for Alfred 4
     
    Description
    Alfred 3 workflow to search and create notes in Evernote.

    Search

    Keywords
    ens to search in every note field ens @ to search in a selected notebook ens # to search notes with a selected tags You can use ent (search in titles only) or enr (search in reminders) or entodo (search to-do notes) or enrec (search notes updated within a week) or enu (search notes with a source URL) instead of ens.

    You can select multiple tags to fine tune your searching. Just add a second hash sign and select or type the tag e.g. ens #tag1 #tag2 :my query

    In addition, you can select a single notebook then tags too e.g. ent @notebook #tag1 #tag2 :my query

    Note that, if you want to select a notebook and/or tags, the query goes after the colon sign as seen above.

    Actions
    Return key to open the note Shift key to preview the note Option key to set a reminder Control key to paste the note text content to the top most application Function key to open the note URL Command key to append text (from clipboard, selected text or typed) or selected file(s) in Finder. After pressing the Command key a new Alfred window will be shown so you will be able to select the text source and the action: Return key will append without date Option key with append with current date Hint: You can also use the Command key to only add tags to a note. To do so, type or select a tag and don't type anything after the colon then select the source "Type a Note" e.g. enn #tag :

    Note that Alfred Fallback Search is also supported (you have to add it in Alfred 2 Preferences>Features>Default Results, then click Setup fallback results button).

    Create

    Keyword enn

    http://cl.ly/image/3t1e440l1c0Q/enn8.png

    You can optionally type the note title or, for a more complex creation, follow the syntax below:

    @Notebook #tag1 #tag2 !reminder :Title
    @notebook: after typing @ a list of notebooks will be displayed then select one or type it; the default will be used if omitted #tags: after typing # a list of tags will be displayed then select one or type a new one (multiple tags are supported, type each one after a hash sign) !reminder: after typing an exclamation point a list of reminder suggestions will be displayed then select one or type a custom reminder such as in 4 days or 05/01/2014 or 05/01/2014 at 2:00 Title: at the end, after a colon (or the second colon if you are adding time in your reminder) Note that items of the syntax are optional, however the syntax has to end with a colon, with or without typing the note title e.g. #tag1 :

    Note Content Source
    From clipboard From selected text Typed directly in Alfred From Safari or Google Chrome URL From message(s) selected in Mail app From file(s) selected in Finder app: you can create one note with files or one note for each selected files. Alfred File Browser also supported. Type a Note also supports multiple lines and, in this case, the first line will be the title of the note e.g. enn Line 1 /n Line 2 /n Line 3

    Actions
    Return key: create a note Control Key: create a note and open it Command key: append text or file to a note Option key: append text to a note with current date How to Append
    Highlight one of the note content source e.g. From Clipboard Optionally type tags and a reminder e.g. #tag1 #tag2 !tomorrow hold command key and hit return key select a note from the list (search by title only) and hit return key Mail
    Message subject as the note title Message received date as the note creation date Message Link as the note source URL A short header (e.g. sender) A plain text version of the email content  
    Note Templates
     
    Read about templates here.
     
    Preferences

    Bring Alfred and type the keyword enpref:
    Search wildcard: you can set the workflow to automatically use the Evernote search wildcard (*) or you can set the workflow to use only if it is typed (the Manual setting may by faster in a huge note collection).  
    Download Evernote 9 beta 3
    Release date: 99 Jun 2019 Made in OS X 10.13.5 Requires Evernote 7.2 from evernote.com Requires Alfred 3 Download now  
    Download Evernote 9 beta 2
    Release date: 09 Aug 2016 Made in OS X 10.11.5 Requires Evernote 6 from evernote.com Requires Alfred 3 Download now  
    For Alfred 2
     
    Version 8.992 Release date: 20 Feb 2015 Made in OS X 10.10.2 Requires Evernote 6.06 from evernote.com Requires Alfred 2.6 or later Download now  
    What's new?
    9 beta 3: minor code optimizations and updated workflow preferences (enpref keyword) 9 beta 2: bugs fixed and Evernote API updated 9 beta 1: Alfred 3 support 8.991: Evernote 6.06 initial support 8.9: Yosemite beta and note templates support 8.7: interface bugs fixed 8.6: enn issue fixed Improved reminder time support e.g. Tomorrow at 2:00 Added support for tags that start with a hash sign e.g. #Home Added support for tags that start with an at sign e.g. @Work Added support for notebooks that start with an at sign e.g. @Notes Workflow should be faster in most of cases When appending from a search result now you can hold Option key to include current date Type a Note supports multiple lines (first line will be the title) e.g. enn Line 1 /n Line 2 New Keyword enl and its hotkey to load the last search query Added support for some of Alfred 2.3 new features Workflow version history here.
  11. Like
    derico reacted to RodgerWW in About This Mac   
    The most current version can now be found on GitHub with very special thanks to xilopaint for continuing and modernizing the original workflow.
    GitHub Download. 
     
     
    Below are my older versions which I will now leave AS-IS for reference:
     
    DOWNLOAD (For Alfred 2)
     
    DOWNLOAD (For Alfred 3)
     
    For those that need to see/copy info from the system.
    Just open Alfred and type "about"
     
    To RESET the workflow type "xabout"
     
    FN+ENTER will copy the selected entry to the clipboard.
    SHIFT+ENTER will paste selected entry to front most app.
     
    CTRL+ENTER will take you to Apple's support website (based on your hardware).
    OPT+ENTER will take you to Apple's hardware specifications website (based on your hardware).
     
    January 11, 2018:
     
    Updated the 'HardwareIcons.xml' to include all new hardware found/referenced for icons of machines. This brings the hardware list up to date as of macOS 10.13.2 (17C205)
    This is just for Alfred 3 and the new filename is "AboutThisMac_2018.alfredworkflow", so make sure you are running the latest. This is a rather big update in terms of hardware icon support and I apologize for not doing it sooner folks!
     
    September 26, 2017:
     
    Added icon and updated script for macOS High Sierra.
     
    February 1, 2017:
     
    Added Macmini7,1 to xml for icon support.
     
    August 15, 2016:
     
    Added icon and updated script for macOS Sierra.
    Made a new version for Alfred 3 removing older Operating Systems to fall in line with what Alfred 3 supports.
    I am leaving the Alfred 2 version alone for those who still want to use it, but, it does not support macOS Sierra.
     
     
    June 3, 2014:
     
    Added Yosemite Icon (also updated script) for those using the Developer Previews so the System Version line shows the correct image.
     
    July 23, 2013:
     
    Added Mavericks Icon (also updated script) for those using the Developer Previews so the System Version line shows the correct image.
     
    July 9, 2013:
     
    I found an error in a line of my workflow which on most systems is a lenient one, but on some results in the Human Readable Machine in line 1 of the results to simply not show up. The error also made the links to the support site and hardware specs site not function correctly. I have corrected this line in the workflow.
     
    PLEASE NOTE: On SOME systems, and even on the current build of Mavericks, the plist file the workflow reads from is protected in a slightly different way. This means the permissions need to be changed on the plist. I have included the Terminal instructions in the 'readme' tab of the Workflow. To access this, load Alfred Preferences, Double Click on the Workflow in the left sidebar "About This Mac", and in the window that pops up, click the Readme tab ... and read!
     
    May 16, 2013:
     
    Added Model Identifier beside system name in top row. SO for MY system it now shows "iMac 27-inch, Mid 2011 (iMac12,2)"
     
    April 17, 2013 :
     
    Fixed a couple minor issues with incorrect selectors in the script. Serial number should show now, and 'GB' after memory size will show again.
     
    Added a system check for those that have multiple computers accessing one workflow folder (thanks DJay for pointing out that not everyone has only one computer).
     
    Removed randomUID generator for items, as the latest version of Alfred2 makes it possible to NOT have to specify unique IDs. SO, if you want an ordered list, please update Alfred to 2.0.3+
  12. Like
    derico reacted to Gaetano in Yet another Wi-Fi Workflow...in Perl   
    Hi all,
    there is a new version of this workflow with the addition of a hotkey triggered scenario (thanks derico for the suggestion) and some code cleanup.
    I also changed a bit the notification.
    You can download it from the link above or down here in the signature
     
    Have fun!
  13. Like
    derico reacted to rice.shawn in Workflows Help Workflow   
    (--- update: currently on version 1.05 -- download links all the same)
     
    So, I have a workflow problem in that I like to install them. Quite a few of them, and I can easily lose track of the commands for each of them. Hence, I present to you a tool that I needed for me: Alfred2 Workflows Help.
     
    Basically, this is a python script that will cycle through your workflows folder, process the info.plist files, and grab the hotkeys and commands from each of them. Then it will compile all of them into a Markdown file, and then show that file in a Quicklook window. Yes! Screenshot is below.
     
    Github Repository here: https://github.com/shawnrice/alfred2-workflow-help
    Download here: https://github.com/shawnrice/alfred2-workflow-help/raw/master/Command%20Help.alfredworkflow
     
    Currently, there is just one command: help.
     
    The file can take a few seconds to generate, and it is generated every time. This will change in a later version.
     
    ---
     
    Some notes: The main script (help.py) is written in python, and it's really my first venture into python, so the code might be laughable. I welcome collaboration and commits. I can give you access to the repo if you private message me. I do think that this workflow has a lot of potential.
     
    This is version 1.0, and there are many improvements to be made. It has Alleyoop support, so updating should be easy.
     
    Quirks and files included:
    This workflow displays the file generated through a debug mode of Quicklook (so that the focus doesn't need to switch to finder), so there will always be a "[debug]" message on the window. I've included a Quicklook Markdown generator in the workflow to make sure that it always displays correctly. There are some images that are included that are not currently used (these are in the "images" folder). They will be used to show the hotkeys later. ALP is included. Right now, only part of the library is used, so I might strip it down to make the workflow smaller. So, the size of the workflow is larger because of these things in there.
     
    ---
     
    Roadmap:
    Clean up the help.py code. Cache the generated file and update it only when the workflow folder changes. Make the display of the file nicer. Add in more images to the file. Display individual workflow helps (show the data for that workflow as well as the readme.md file). Have a better precedent to show either text or subtext for the command help. Try to figure out a way to describe arguments taken for different commands / hotkeys. Make it understand file actions better. Clean up the file/folder structure. Maybe some more... any ideas?  
    Dependencies and Testing:
    Built on 10.8.3, but this should be compatible for all systems as the only dependencies are included in the workflow.
     
    Screenshot:
     

  14. Like
    derico reacted to isometry in iTunes Movie Trailers Search   
    Inspired by samvlu and MattCheetham here, I thought I'd try something a little different from my other workflows.
     
    I present iTunes Movie Trailers Search with poster icons. Find a movie by title and hit enter to open the movie trailer page in your default browser.
     
    Comments and pull requests welcome. Are the posters – as I suspect – a waste of time, bandwidth and space?
     
    Download / Source
     
    Note: initial population of the poster cache can take a few seconds, so give your first few searches time to complete.
     
    Usage
    trailer avenge    # "Captain America: The First Avenger" + "The Avengers"
    trailer latest    # Special case: return Apple's "Just Added" listing
     
    --
    Robin
  15. Like
    derico reacted to CarlosNZ in TimeZones - a World Clock script filter [updated to v1.7]   
    Here's another little tool I've just whipped up:
     

    Get an instant list of the current time in various cities around the world. Which you can customize, of course.
     
    Main keyword: tz (for TimeZones) - this just shows the World Clock list (seen above). (Select a city for a Large Type display.) To remove a city from the list - option-select it. To add a new city - timezone add Name of City To update all cities' timezone offset information - timezone update To look up the time in a place without storing it (custom loookup), just keep typing the place name after the initial tz (eg. tz timbuktu) To move the location of your stored city list - timezone move Download v1.7a
     
    This workflow saves a list of your cities and their UTC offsets locally, so the basic world clock will display instantly. Adding new city information is done via an API call to Google Wolfram Alpha. The only downside to locally cached offsets is that there's no provision for automatically updating for Daylight Savings changes, but a manual timezone update will refresh all the cities with their current offset.
     
    Enjoy. As usual, I welcome comments, bug reports, feature requests, etc.
     
    ----
     
    28 March 2013 - UPDATE to v1.5
    Major rewrite - now uses Google Maps APIs, which should be a lot more reliable and consistent. Flag icons! Bit of eye candy, courtesy of http://www.free-country-flags.com (and managed to squeeze flags for every country in the world into just over 400k - thank you TinyPNG ) More detail retrieved and displayed, including timezone name, country, etc. When doing a full "update", a text file is saved to your Desktop summarising any changes found. General enhancement and tweaks. PLEASE NOTE: Because this version stores its data substantially different to previous versions, it will create a new timezones.txt file with default cities. However, it will attempt to save your old timezones.txt file to your Desktop, so you should be able to rebuild your previous list without too much hassle.
     
    A quick note about the flags: The workflow simply compares the retrieved name of the country and does a simple name match against the workflow's local repository of flag icons. From my testing, it's working very well, but I'd appreciate it if you'd report back if you find any countries that don't properly match a flag icon. Cheers.
     
    ----
     
    31 March 2013  - UPDATE to v1.6
    New feature: Custom lookups. Just keep typing a new place name after the tz keyword to look up the time in a place without saving it to your saved list. Added support for phyllisstein's Alleyoop auto-updater. [EXPERIMENTAL] - support for autocomplete for adding place names (timezone add). You'll need to add a keyword yourself to the script filter if you want to try it out. The reason I haven't enabled it by default is that I've found it kind of slow and I'm not sure it's actually an improvement over the current method. Let me know what you think.
    [Add a keyword to this script filter if you'd like to try it out] Novelty: Added (unofficial) Antarctica flag to flag repository. (Try tz south pole.   ) ----
     
    2 April 2013 — UPDATE to v1.61
    Small fix for Dutch (Netherlands) flag matching.  
    ----
     
    22 March 2014 — UPDATE to v1.7
    City List now always shows in the same order. (Achieved by removing “uid” parameter.) Removed Alleyoop updater. ----


    22 March 2014 — UPDATE to v1.7a
        New 256x256px icon
  16. Like
    derico reacted to mixterdee in PLEASE VOTE: Your favourite workflows   
    EverNote Workflow by Carlos-Sz
  17. Like
    derico reacted to mixterdee in PLEASE VOTE: Your favourite workflows   
    Weather D Ferguson
  18. Like
    derico reacted to robhor in Drill-Down Menus: Movie search (OMDb-API) & Alfred Repo   
    Hey,   I was experimenting with workflows that allowed "drilling down" into an result to provide more options, and here's what I came up with.   Firstly, a workflow that uses omdbapi.com to search for movies, actioning a result shows you more information and actions.   Download: here or via AlfPT     As a second workflow using this I built an alternative client workflow to Tom Hunt's Alfred Workflow repository. It has some performance improvements over the "official" AlfPT workflow, and a few extras like updating all workflows, uninstalling and opening workflow folder from within the workflow.    
    Download: here or via AlfPT
  19. Like
    derico reacted to redwall_hp in IMDB Search Suggest   
    Alfred 2 making that IMDB web search a little boring? How about a shiny new workflow for IMDB search suggestions? It leverages IMDB's own suggest protocol to deliver snappy results right into Alfred. (Really, it's fast. They're using static JSON files on a CDN.)
     
    Selecting a result will take you directly to the page for the film or name you're looking for, or if there are no suggestions, you can jump to a plain IMDB search page instead.
     
    Download
     
    GitHub Repo
     

     
  20. Like
    derico reacted to bevesce in Find and paste unicode symbols - arrow, triangles, greek and more   
    Find and paste unicode symbols. I included a lot of them, like really a lot, over 20k I think, but for me workflow works pretty fast.
     
    Symbol can be pasted as symbol (mh...), in html encoding, as python string and as unicode code point.
     
    Download:
    https://github.com/bevesce/unicode-symbols-search/raw/master/Symbols.alfredworkflow
     
    Source:
    https://github.com/bevesce/unicode-symbols-search
  21. Like
    derico reacted to Gaetano in Yet another Wi-Fi Workflow...in Perl   
    Hi all,
    I know, there is plenty of smart Wi-Fi toggle workflows out there so it's hard to believe we need another. Anyway, this is the one I made by myself, in Perl, adding some bells and whistles like current IPv4/v6 address, MAC address as well as the SSID of the current connection.
     
    It looks like this:
     

     
    If you like it you can download it from this page.
     
    As usual, any comment is the very welcome 
     
    Have a nice day
    Gaetano
  22. Like
    derico reacted to Dexwell in IMDb Search Suggestions   
    I've completely rebuilt redwall_hp's original IMDB Search Suggest workflow to include more information in results, a fallback for longer search queries using a cache, and a new icon. I've also changed the keyword to i but you can easily change that to imdb or whatever you like. I hope you'll enjoy!
     
    Download .alfredworkflow GitHub  

  23. Like
    derico reacted to iKam in Bluetooth toggle   
    A python script toggle for turning on/off bluetooth and show the state in NotificationCenter.
     
    Pyton script author: seapy (http://seapy.com)
     


    Download: http://dl.dropbox.com/u/16389684/Bluetooth%20Toggle.alfredworkflow
  24. Like
    derico reacted to Andrew in Open url with hotkey (10.6) [Fixed in temp b179, link in thread]   
    There seemed to be a little bug in 10.6 related to default browser selection for this workflow config. I've put together a new build for you which should fix this (from now on).
     
    http://cachefly.alfredapp.com/Alfred_2.0.2_179.zip
     
    Let me know how you get on
  25. Like
    derico reacted to RodgerWW in Request: About this Mac   
    OK folks here is Verison02
     
    This version is outdated and the final can be found HERE.
     
    Upon starting to type the KEYWORD "about" you will see:
     
    [image removed]
    When completing the keyword "about":
     
    [image removed]
     
    When selecting an item, then holding "fn" + "ENTER" it will copy the TITLE value to the clipboard.
    When selecting an item, then holding "shift" + "ENTER" it will paste the title value to the front most app.
     
    For Example: If I mouse down to "System Version (Build)" and hit "fn" + "ENTER" it will COPY "OS X 10.8.3 (12D78)" to my clipboard.
     
    The workflow now includes 2 more modifiers!
    Holding "ctrl" + "ENTER" anywhere, will open the Apple Support Site for YOUR hardware in your default browser.
    Holding "opt" + "ENTER" anywhere, will open the Apple Technical Specifications Site for YOUR hardware in your default browser.
     
    These two new added functions simulate the support links in "About This Mac", selecting "More Info", selecting the "Support" tab, then selecting either "Specifications" or "Hardware Support."
     
    I personally thought this was a wicked idea to minimize the  amount of mouse movements and clicking necessary just to see if my hardware is still under warranty and what my support options are.  I've come a LONG way since using Alfred1 to simply launch apps ... this is all done with ZERO scripting knowledge folks! 
     
    NOTES:
     
    I still need to figure out the hardware icon that is displayed beside the human readable hardware. For NOW, I have it showing the "iMac (27-inch, Mid 2011)" icon Apple uses for MY hardware. This is not dynamic yet, as I need to figure out a reliable way to grab the icons Apple uses from "CoreTypes.bundle."
     
    For now, you 'advanced' users can simply grab the appropriate icon for your hardware from "CoreTypes.bundle," copy it over to the workflow folder, then edit the <icon> attribute in the xml output to reflect the proper icon.
     
    OK, so here's what I need from you fine folks reading this:
     
    1: Please, try out the hotkeys, specifically the "ctrl" and the "alt" modifiers. I need to know that the method used to grab the data is current, and accurate. Apple has changed this over the years, and I am hoping they are sticking with the method I'm using for ALL hardware.
     
    2: Alfred2 and/or scripting (/bin/bash/) GURUs ... please look over the scripting in the workflow and  help me clean it up if it needs to be. So far, everything 'works' for me, but as stated earlier, I've done all of this with zero knowledge and I would hate to have a sloppy workflow here.
×
×
  • Create New...