Jump to content

Search the Community

Showing results for tags 'compress'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Alfred 3
  • Make the Most of Alfred
    • Discussion & Help
    • Bug Reports
    • Alfred Feature Suggestions
    • Themes
  • Alfred Workflows
    • Share your Workflows
    • Workflow Help & Questions
  • Alfred v2 Themes
  • Alfred Remote for iOS
    • Alfred Remote Discussion & Help
    • Remote Connection Troubleshooting

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Twitter


Website URL


Jabber


Location


Interests

Found 4 results

  1. Zip: compress files and folders within Alfred Overview Zip files and/or folders Finder and Alfred File Action supported Unique filename Remove .DS_Store files Triggering keyword zip - after selecting files and/or folders in Finder, bring Alfred and type zip. You can optionally type the zip filename. You can optionally hold control key to select the zip file folder destination. hotkey - after selecting files and/or folders in Finder hit the hotkey. A new zip file will be created based on selection. Alfred File Action - select files and/or folders in Alfred file browser to zip (see screenshot below). What’s new in version 4.0 Alfred 3.0 supportWhat’s new in version 3.0 Select the destination folder by holding control key (keyword zip) Updated to Alfred 2.0.3 (187) Alleyoop 2 support Download Version 4.0 Release date: 08 Jun 2016 Requires Alfred 3 Download Now Zip for Alfred 2 Version 3.0 Release date: 23 Apr 2013 Requires Alfred 2.0.3 (187) Download Now
  2. Hi Guys, I'm quite new to alfred and automation in general, so I hope you'll bear with me. I'm trying to create a workflow, where a hotkey triggers an image (or selection of images) to be resized and then compressed either through the mac app "JPEGmini" or through "tinyPNG" online. I've divided this up into 4 steps that I'm trying to work on: Resize selection Determine whether it is a jpg/png If JPG compress on mac through JPEGmini If PNG compress online through tinyPNG So this is what I have so far: 1. Resize Image (code by Acidham, altered by ilium007) on alfred_script(target_width) set theCount to 0 set currSelection to {} tell application "Finder" set theSelection to selection end tell repeat with this_file in theSelection -- try to get a jpg or png try tell application "Finder" set myPath to POSIX path of (this_file as text) end tell tell application "Image Events" -- open the image file set this_image to open myPath -- get dimensions of the image copy dimensions of this_image to {W, H} -- calculate scale factor with given width and scale the image set scale_factor to target_width / W scale this_image by factor scale_factor save this_image in myPath close this_image -- get new image width and height for output set new_W to round (W * scale_factor) rounding as taught in school set new_H to round (H * scale_factor) rounding as taught in school set new_size to new_W & " x " & new_H end tell -- set the_return to (W & " x " & H & " → " & new_size) as text -- return the_return set theCount to theCount + 1 on error errStr number errorNumber return "No image file found!" end try end repeat return ("Processed " & theCount & " images") as text end alfred_script 2. Haven't worked on this yet. 3. JPEG compress with JPEGmini - Notification and set filePath on alfred_script(q) display notification with title "Optimising JPEG ..." subtitle "Path: " & (the clipboard as text) tell application "Finder" set theItems to selection set filePath to (POSIX path of (the selection as alias)) end tell end alfred_script - Copy file path to clipboard action through Alfred - Activate JPEGmini and use system events to open file through paste from clipboard on alfred_script(q) tell application "JPEGmini" to activate delay 2 tell application "System Events" keystroke "o" using command down keystroke "G" using {command down, shift down} keystroke "v" using {command down} keystroke return keystroke return end tell end alfred_script This is my first go with apple script and I don't think this is quite the right way to execute this. Namely, system events seems to be quite inefficient as I can only run a single image at a time. Ideally, I would like this part to run hidden and be able to compress all selected JPEGs once they have been resized. 4. PNG Compress online - Using carlosNZ's fantastic workflow for TinyPNG with custom API. CarlosNZ's Tiny PNG Workflow Ideally I would like to get this workflow to the point where, either a hotkey or keyword could be used on a selection of images that would be resized and run through either JPEGmini or TinyPNG depending on the file type. The resize and tiny png parts work, so I'm hoping to improve the JPEGmini flow and have a conditional if for jpg/png. Alternatively, just a better workflow for JPEGmini would be fine as I could run the resize/jpg/png workflows separately. The use case would be to quickly run web images through the process that are 1920 wide. I'm aware that with poor coding skill, this is an uphill battle, so all help is really appreciated. If anyone is interested in assiting, I would reimburse you for your time as well. Thanks alot
  3. This is a little utility workflow that allows you to shrink your PNG files. The workflow uses the service provided by http://tinypng.org, which also explains what exactly happens when PNG files are shrunk. You need an active internet connection for this to work. Included in this workflow are File Actions (action: Shrink with TinyPNG), File Filters (keyword: tinypng) and a configurable Shortcut. Once you select a PNG file / or files and invoke the workflow, it will create a backup of your original file with the prefix "original_" and then compress your file using the web service. To get an idea of the savings, the image above was shrunk using the workflow to get a savings of 72%. Download. All images in this post were shrunk using the TinyPNG workflow. EDIT: If you are looking for an alternate similar workflow, try this one by @CarlosNZ
  4. One of the biggest oversights I think OS X has is the lack of a hotkey to quickly archive (zip) files. With Alfred I'm able to create this using AppleScript and a hotkey trigger. I've created a workflow that uses both a Hotkey ( cmd + shift + \ ) and a Keyword ( zip ) to compress the selected files or folders into a zip. It's stupidly simple to modify. Download it - http://makitra.in/NcRZ http://i.makitra.in/NcRZ If you're looking for more options try this workflow out by Tyler Eich - File/Folder Archiver
×
×
  • Create New...