Jump to content

ramiro.araujo

Member
  • Posts

    84
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by ramiro.araujo

  1. ImageOptim Workflow for Alfred app
    This is a wrapper Alfred workflow around the great ImageOptim-CLI library from Jamie Mason. Mason's library uses three image optimization applications to automate optimization of JPEGs and PNGs. It uses the open source ImageAlpha and ImageOptim apps, and the JPEGmini app, which is not free, but highly recommended. Together they shrink images like a beast.
    My own addition to this image processing is that if JPEGmini is unavailable, it uses ImageMagik's mogrify to compress JPEGs to quality 75, if they're actually higher than 75. To do this, I'm also bundling ImageMagik'smogrify and identify. A quality of 75 is usually pretty safe and it still has a way smaller size and usual JPEGs saved from Photoshop without optimization. That being said, JPEGmini does way better job and it's recommended.
     
    Requirements

    • ImageOptim, installed in /Applications folder.
    • ImageAlpha, installed in /Applications folder.
    • JPEGminioptional but recommended, installed in /Applications folder.
    • If using JPEGmini, you need to add Alfred 2 to the allowed apps in the accesibility list. Go to Preferences, Security and Privacy, Privacy tab, click the lock to allow changes, and drag the Alfred 2 app into the list.

    Usage
     

    1. find or select one or more images or folders, show the file actions in Alfred, and select "Optimize Images". Note that any Alfred's way of selecting files work, such us:

    • select one or multiple files/folder in finder and press ⌘ alt \
    • browsing or finding files in Alfred, and triggering actions for the file
    • saving files in Alfred's file buffer, and then ⌘ → to action buffered files.

    optimize.png
     

    2. You'll see a notification indicating the number of files to process. The work is done partially with AppleScript, so even if it's happening in the background, the apps are actually laoded and you can focus on them to check the status. Depending on the number and size of images, it could take a while.

    notification-start.png
     

    3. When the optimization is completed, you'll see another notification, indicating the original Kilobytes, the current Kilobytes, total savings and savings percent.

    notification-feedback.png
     
    Caveats
    You shouldn't run optimizations in parallel. Tecnically you could if the batch already jumped to the next app (from JPEGmini to ImageOptim for example), but it's looking for trouble. I'll consider adding a check in the future to prevent parallel process from happening, but I'm affraid this could add other complications, as in how to clear the processing flag if optimization process is interrumpted earlier.
     
    Installation
    For OS X 10.9 Mavericks, Download the alfred-image-optim-workflow.alfredworkflow and import to Alfred 2.
    For Previous OS X Versions, Download the alfred-image-optim-workflow.alfredworkflow and import to Alfred 2.
     
    Source Code
    Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-image-optim-workflow
     
    Changelog

    • 2014-01-06 - Released
    • 2014-01-23 - Added folder support, and correctly counting number of files inside folders
  2. Convert OS Paths Workflow for Alfred app

    Worflow for swithching back and forth between UNIX and Windows Paths, specifically between Mapped Drives and Mounted Network Volumes. It features the actual switching of paths, optionally open the path in Finder, and configuration options to list, add and remove mappings between Windows drives and UNIX volumes.

     

    Setup
    You'll need to add one or more mappings before doing the conversions. Check below on usage for more info.

     

    Usage

    • Type convertadd keyword to add a new mappping, for example convertadd R MyVolume. This will map R:\ Windows Paths with /Volumes/MyVolume UNIX Paths. After convertadd you need to specify a Windows Drive letter, followed by a UNIX Volume name.

    convert-add.png

    • Type convertlist keyword to list current mappings. Hold down the alt key to delete a mapping.

    convert-list.png

    • Type convert keyword followed by a valid and mapped Windows or UNIX path to have it converted and copied to the clipboard. Hold down Command to instead open the path in Finder if converting to UNIX.

    convert-to-unix.png
    convert-to-windows.png

     

    Installation
    For OS X 10.9 Mavericks, Download the alfred-convert-os-path-workflow.alfredworkflow and import to Alfred 2.
    For Previous OS X Versions, Download the alfred-convert-os-path-workflow.alfredworkflow and import to Alfred 2.

     

    Source Code

    Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-convert-os-path-workflow

     

    Changelog

    • 2014-01-06 - Released
  3. @kopischke, thanks! Actually I'm still trying to figure out quite a few things about Ruby, and messed up with the OS ruby, so I timemachined a few weeks back to bring it all back to zero.

    gem list lists no gems, sudo gem list 4, and among them sqlite3, so that's great! thanks!

     

    Are you experienced with Ruby and specially ruby environments? I have quite a few doubts :)

     

    Cheers

  4. @akella, I'm not sure when Transmit 4 started using sqlite for saving Favorites, and I couldn't find anything in their site. This workflow only works with the SQLite version. I would be happy to also try to implement it using this xml, if you can cleanup personal and credential data and send it to me I could try :)

     

    Also, if anyone has info about when Transmit 4 started using SQLite, specifically from which version, I could update the README and post to reflect this

  5. Transmit 4 Workflow for Alfred app
    Workflow for searching and opening Favorites in Transmit 4 App. It's really fast, because it reads the SQLite Database or XML datasource in latests releases of Transmit 4.
    There are already at least 2 Transmit workflows, but one is incompatible with latests Transmit 4 and the other, although very good, uses AppleScript to do the searching, and thus you need to wait for Transmit to open to get feedback. This is particulary slow on non SSD machines.
     
    Usage
    Type the keyword (default ftp) and start typing the name of the favorite to search; dead simple.
    search.png
     
    Installation
    For OS X 10.9 Mavericks, Download the alfred-transmit.alfredworkflow and import to Alfred 2.
    For Previous OS X Versions, Download the alfred-transmit.alfredworkflow and import to Alfred 2.
     
    Source Code
    Clone or Fork the Workflow: https://github.com/ramiroaraujo/alfred-transmit-workflow
     
    Changelog

    • 2013-12-16 - Released
    • 2014-01-02 - Added support for previous OS versions, using System Ruby 1.8, tested up to Lion
    • 2014-01-03 - Search in both Favorite name and host
    • 2014-01-20 - Added support for Favorites.xml
    • 2014-01-30 - Rebuilt XML search to use different Ruby xml parser

    Note: I updated the original description to match the project readme file

  6. Great workflow! I used the previous one a lot but doesn't seem to work with last version of Transmit, even if I don't sync with Dropbox and symlink the plist file.

     

    I'm having one strange problem though:

    When connecting to an FTP through the workflow, it connects just fine, but I can't navigate to parent folder using the Cmd+UP shortcut. I can navigate inside (Cmd + DOWN) and move around with keys, but not up. The funny thing is, the shortcuts all work fine if I connect normally to the FTP by opening transmit and launching some favorite. I noticed it opens an extra tab, but closing the previous one doesn't solve it.

     

    Really weird, but it only happens when I connect through the workflow, and I really need the shortcuts!! :D

     

    I'll check the Applescript if I can later

     

    Cheers

  7. @Jack James, a tiny bug I've seen since the beginning but never bugged me enough. When specifying the time for the reminder, you need to keep the minutes, hours, days string in plural, else the app wont get it right. For example, if I want a reminder in 1 hour, I need to type: r in 1 hours do something. Not a big deal, but counterintuitive. :)

  8. Simple Workflow to disable or re-enable Notification Center Alerts from 10.8. It's the same behavior as manually disabling them by sliding the de Notification Center, scrolling up, and turning off the "Show Alerts and Banners" badge. The Notifications will resume tomorrow, or so NC says (didn't wait until tomorrow yet).

     

    Here is how it looks (I got all fancy with the keyword)

    screenshot.png

     

    The Workflow it's named Toggle, but actually gives you both options ON and OFF. I'll probably change it to a real toggle later (maybe a pull request?)

     

    BTW, notifications are turned off 7 seconds after you call it off, in order to see that last notification of the Notifications being turned off :D

     

    Hope you like it!

     

    Download:

    https://github.com/ramiroaraujo/AlfredWorkflows/blob/master/Toggle%20Notification%20Center%20Alerts/Toggle%20Notification%20Center%20Alerts.alfredworkflow?raw=true

     

    Fork:

    https://github.com/ramiroaraujo/AlfredWorkflows

×
×
  • Create New...