Jump to content

Recent Downloads with Feedback


Recommended Posts

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

 

 

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.

 

I do not understand what you mean by Downloads folder and it's sub-folders vs Downloads folder and walking down. Sorry for the confusion. I have My downloads folder arranged as such:

~/Downloads

     -26-01-13

     -25-01-13

     -24-01-13

     -23-01-13

.... etc... so the script really only has to go one level deep as I have hazel automatically move downloads to the the dated folder they correspond with. For instance all my downloads for today went to 29-01-13. I hope that clears it up. Beyond that I have no downloads organized further below one sub-folder in ~/Downloads.

 

 

2) I will clear the cache now and see if that helps with the results. I did just notice that some folder that were created even before I installed the extension are listed there. I will clear it and let you know the results. Thanks for making install/action feature optional too! I really appreciate this great workflow and the time your putting into it. I have been waiting for something like this for a long time. Cheers bud! IF there is anymore confusion/questions let me know and I will get back to you when I clear the cache. Thanks again!

 

Update: Cleared the cache and still no luck with better results. Every single file in my ~/Downloads folder is picked up but not in order. For instance I have my ~/downloads/22-01-13/ folder up near the top of the list and a bash script I downloaded earlier this morning as the first result. I deleted the contents of the cache file and I deleted it complete to allow for recreation of a new one. It simply takes all the files in the folder but they aren't being arranged properly. If I run the mdls command that is in the script  mdls -name kMDItemDateAdded -raw ... on my downloads I am getting proper info. Each one is accurate even when downloaded extremely close together... to the second. Not sure what is up. Any ideas? Thanks again for you time helping me troubleshoot this! Much appreciated bud!

Link to comment

Update # 2: So after clearing Alfred's own cache and knowledge in Advanced Prefs the cache folder ~/Library/Caches/com.runningwithcrayons.Alfred-2/Workflow Data/recentdownloads.ddjfreedom is writing and apparently ordering the files in the correct order now. Alfred is now also displaying them in the correct order!  Hooray! Thanks for the info!

 

 

Now for the big request...  if I could only get the script to read one subfolder deep I'll be in business! Do you think it is possible? Really each day files are added to one folder inside of ~/Downloads.... For instance today my files are going to be placed inside of: ~/Downloads/29-01-13/ by Hazel. If the script could read files a sub-folder deep I could use it no problem with my current setup. Thanks again for the quick response and help. Cheers, look forward to hearing from you!

Link to comment

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

Link to comment
  • 1 month later...

I noticed that this workflow was taking a little while to display the results. I did some testing and it looked like the slowdown was from rendering the XML for so many results (I had 276 files/directories in my downloads folder). When I limited the results to 20 or 40 (which is the max amount of results Alfred can show for its built in file search), it loaded about 3 times faster. Just a quick suggestion.

Link to comment

I noticed that this workflow was taking a little while to display the results. I did some testing and it looked like the slowdown was from rendering the XML for so many results (I had 276 files/directories in my downloads folder). When I limited the results to 20 or 40 (which is the max amount of results Alfred can show for its built in file search), it loaded about 3 times faster. Just a quick suggestion.

How do you go about doing that if you don't mind me asking? Thanks for the tip, I suffer from the same problem so limiting the results is probably going to speed things up for me a good bit. thanks in advance for the help explaining something that's probably apparent to most ;) cheers!

Link to comment

How do you go about doing that if you don't mind me asking? Thanks for the tip, I suffer from the same problem so limiting the results is probably going to speed things up for me a good bit. thanks in advance for the help explaining something that's probably apparent to most ;) cheers!

 

Change line 74 of recent_downloads.rb to:

 

  results.first(40).each do |path|

 

You can change 40 to however many results you want it to display. A better solution would be to add a setting in the config.yaml file, but this is just a quick patch.

Edited by Clinton Strong
Link to comment

Change line 74 of recent_downloads.rb to:

 

  results.first(40).each do |path|

 

You can change 40 to however many results you want it to display. A better solution would be to add a setting in the config.yaml file, but this is just a quick patch.

 

Excellent, thanks for the quick response. I'm going to try this now...

 

EDIT: Wow, that really does speed things up. About three times as fast now.

Edited by twinpeaks
Link to comment
  • 2 weeks later...
  • 4 weeks later...

This is a great workflow! I think it would be nice if the Alfread windows remains open (reopens with the same info) when the user deletes a file so that it's easy to delete multiple files...

 

You could always use the file buffer. Press shift+up to add a file to the buffer, then press shift+right and type "delete" after you've added all the files.

Link to comment
  • 2 months later...

Very nice addon :-)

 

Any idea why 'idle.app' is ALWAYS showing up as first item in the list? (it obviously does _not_ exist in the downloads folder..)

 

Thanks!

 

Alfred does matching anchored to capital letters, so "dl" matches the the the "DL" in the IDLE app. Workflow results are mixed in with Alfred's default results, so you'd see IDLE.app in the results regardless of whether or not you have the workflow installed. You could try changing the keyword to something that doesn't bring up any other results (may not be optimal), or you could add IDLE.app to Spotlight privacy to hide it altogether, but of course that's only a viable solution if you never intend to launch the app.
 
One workaround could be to add IDLE.app to Spotlight privacy and make a workflow with a keyword of "idle" to launch that app. It'll show up when you type "id" or "idl", but not when you type "dl".
Link to comment

 

Alfred does matching anchored to capital letters, so "dl" matches the the the "DL" in the IDLE app. Workflow results are mixed in with Alfred's default results, so you'd see IDLE.app in the results regardless of whether or not you have the workflow installed. You could try changing the keyword to something that doesn't bring up any other results (may not be optimal), or you could add IDLE.app to Spotlight privacy to hide it altogether, but of course that's only a viable solution if you never intend to launch the app.
 
One workaround could be to add IDLE.app to Spotlight privacy and make a workflow with a keyword of "idle" to launch that app. It'll show up when you type "id" or "idl", but not when you type "dl".

 

 

Argh, ofcourse.. that explains thanks a lot. The confusing thing is, when i type the complete keyword "dl" the "recent downloads" item disappears and all the results are shown. So you can't actually select/click "recent downloads" any more - because that would prevent other stuff from showing as well.

 

Anyways problem solved, thanks :-)

Link to comment
  • 3 months later...

Unfortunately, this extension stopped working for me. I don't know if it is related to the fact that I've updated to Mavericks or not, but I can't figure out why it is not showing recent downloads anymore:

as soon as I finish typing the keyword 'Recent', Alfred defaults to fallback results.

 

Help?

Link to comment

Unfortunately, this extension stopped working for me. I don't know if it is related to the fact that I've updated to Mavericks or not, but I can't figure out why it is not showing recent downloads anymore:

as soon as I finish typing the keyword 'Recent', Alfred defaults to fallback results.

 

Help?

 

I have the same problem: Since upgrading to Mavericks, many workflows, including this one, won't work. :-(

 

UPD: It seems that this problem has something to do with Ruby — all workflows that stopped working use Ruby scripts.

Edited by targumanu
Link to comment

Unfortunately, this extension stopped working for me. I don't know if it is related to the fact that I've updated to Mavericks or not, but I can't figure out why it is not showing recent downloads anymore:

as soon as I finish typing the keyword 'Recent', Alfred defaults to fallback results.

 

Help?

 

I have the same problem: Since upgrading to Mavericks, many workflows, including this one, won't work. :-(

 

UPD: It seems that this problem has something to do with Ruby — all workflows that stopped working use Ruby scripts.

 
What kind of error are you getting? You can go into Alfred Preferences and right click the workflow in the sidebar, then select Show in Finder. Open up the Terminal app, and drag and drop the workflow's folder into Terminal. Then copy and paste this command and press return:
 
/usr/bin/ruby recent_downloads.rb " "

Let me know if you get an error after running that. I don't have access to Mavericks right now, so unfortunately I can't test it myself.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...