Jump to content

ddjfreedom

Member
  • Posts

    16
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by ddjfreedom

  1. Added the ability to include subfolders. It can be specified using 'subfolders' in 'config.yaml'. An example:

     

    subfolders:-    folder: "a"    exclude: false    depth: 2-    folder: "b"    exclude: true-    "c"

     

    It will include everything which is of the form "~/Downloads/*", "~/Downloads/a/*", "~/Downloads/a/*/*", "~/Downloads/b/*", "~/Downloads/c/*". But "~/Downloads/b" will not appear in the result (since 'exclude' is true).

     

    If you want to include every subfolder, ':all' can be used:

    subfolders: :all

    or more flexibility

    subfolders: 

        folder: :all

        depth: 2

        exclude: true

     

    Updated on AlfPT, and http://d.pr/f/409f

  2. Thanks, very handy..

     

    fyi, Recycle bin is showing up in the list for me :-)

     

    Is that also hidden? I just filter out all file names starting with '.'. I'll fix this.

     

    A couple of things. 

     

    - I just want to use the script to display the most recent downloaded file. I have no use for the install etc... action you have added. Which is nice but I had disabled that from the v1 script othijus shared.

     

    1) Are there any plans to have the script be capable of going down at least one directory to deep for those of us who auto-organize downloads with apps like Hazel and Glims for Safari?

     

    2) I am not getting accurate results. Default clean install of 10.8.2 with Xcode and command line tools etc... but I can go to macupdate.com - download 3 files in a row and they are usually mixed up a bit with older folders residing in ~/Downloads (2-5 days old) appearing before the just downloaded files.

     

    Just realized that it will always check if there are stuff to install. Sorry about this. I'll fix it.

     

    1) Do you mean display items from Downloads folder and all its sub-folders? Or display items from Downloads folder and walking down folders? If the latter, I'll have to set folder's 'valid' key to "no", and no operation can operate on it.

    2) The workflow uses

    mdls -name kMDItemDateAdded -raw "Filename"

    to get the time when an item is added to Downloads, and use this to sort the item. Because mdls is quite slow, the workflow caches the result in a file under 

    ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/recentdownloads.ddjfreedom

    I'm guess the cache becomes inconsistent with the order of files in Downloads. Another possible reason is that the workflow uses file name as uid, maybe Alfred changes the results a bit.

  3. changed the default behavior of certain files: if the item can be installed (an application, an dmg file, a zip file containing those files, etc), the workflow will prompt the user whether to install it. After the installation, if the item installed is an application, the workflow will prompt the user whether to launch it.

     

     

    Use config.yaml in ~/Library/Application Support/Alfred 2/Workflow Data/recentdownloads.ddjfreedom/ to control the new default behavior:

     

    install_action: ask, install, open, cancel

    auto_start: ask, always, never

     

     

    new version is on AlfPT and http://d.pr/f/CAIi

  4. Hi, 

     

    Very interesting workflow.

    My problem is I do not see any items filtered.

     

    I type this workflow keyword, "Recent Downloads" is selected 

    then I type "enter". Then ... I can't do anything.

     

    After typing "enter", I tried to insert the name of the latest download, it didn't work.

    I even tried to type "enter", holding ctrl or cmd or option but my latest download

    was still there...

     

    I have nokogiri installed "require 'nokogiri' => True".

     

     

    I am pretty sure I didn't understand how to make it work properly. 

    Could you elaborate for the newbie that I am ?  :)

     

    Thank you.

     

    I'm not exactly sure why. One reason may be that folder

     

     

    ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data

     

    doesn't exist. The workflow will store some data in a folder created in that folder, so if it doesn't exist, the workflow fails. 

    Maybe you can use the newest build of Alfred 2. I think it will automatically create the folder. Or you can manually create it.

  5. Hey I suck at programming. Would you help on that? I tried installing your ruby gem but here is what i get:

     

     

    ERROR:  Error installing nokogiri:
    ERROR: Failed to build gem native extension.

     

    xcrun: Error: could not stat active Xcode path '/Applications/Xcode45-DP4.app/Contents/Developer'. (No such file or directory)

     

     

    (of course i get a whole lot more but these seem to be the most important ones).

    I do have xcode installed as well as the command line tools.

     

    According to http://stackoverflow.com/questions/11961032/xcrun-error-could-not-stat-active-xcode-path-volumes-xcode-xcode45-dp1-app-c, you need to run

    sudo xcode-select -switch /Applications/Xcode.app

     

    And I've updated the link in the original post. Now delete works both on files and folders, and hoding 'cmd' to move item to Trash. You can also download it here: http://d.pr/f/te4d

  6. An Alfred workflow for opening or revealing the most recently downloaded items in “~/Downloads”.

     
     
    The items are sorted in decreasing order according to when they were added to the folder. Items are filtered by whether they contain the query as a subsequence. The result is displayed using the feedback functionality.
     
     
    Use config.yaml in ~/Library/Application Support/Alfred 2/Workflow Data/recentdownloads.ddjfreedom/ to control the new default behavior:

     

    install_action: ask, install, open

    auto_start: ask, always, never

     

    Updated:
    1. added the option to delete files (holding 'ctrl') (by fmr)
    2. result's icon matches file's icon
    3. added the option to move files to trash (holding 'cmd') (by fmr)
    4. changed the default behavior of certain files: if the item can be installed (an application, an dmg file, a zip file containing those files, etc), the workflow will prompt the user whether to install it. After the installation, if the item installed is an application, the workflow will prompt the user whether to launch it.
×
×
  • Create New...