Jump to content
ddjfreedom

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!

Share this post


Link to post
I guess that the name of the zip file contains white space? Sorry about that. Just updated the workflow to address this. http://d.pr/f/YoTI

Yes, I think it did contain whitespace (it was an alfred workflow and I have since deleted the zip so I cannot confirm). 

 

Thanks for making the swift change, this is an invaluable extension!

 

Cheers

Share this post


Link to post

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!

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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!

Share this post


Link to post

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

Share this post


Link to post

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

Share this post


Link to post

Sorry for the delay in updating. Just added 'max-entries' config to limit the number of results being displayed.

 

http://d.pr/f/UPnq

 

It defaults to 20 results. If you want to display everything in the Downloads, just change the value to ':all'.

Edited by ddjfreedom

Share this post


Link to post

Anybody get subfolders to work with the latest version? Doesn’t seem to like my setup, i.e. no results. No subfolders it works great but with subfolders... no dice.

 

Subfolder still works fine for me. What's in your config?

Share this post


Link to post

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...

Share this post


Link to post

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.

Share this post


Link to post

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!

 

 

Screen%20Shot%202013-06-29%20at%2015.56.

Share this post


Link to post

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".

Share this post


Link to post

 

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 :-)

Share this post


Link to post

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?

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...