twinpeaks Posted January 29, 2013 Share Posted January 29, 2013 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
scottisloud Posted January 29, 2013 Share Posted January 29, 2013 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 Link to comment
twinpeaks Posted January 29, 2013 Share Posted January 29, 2013 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
ddjfreedom Posted January 30, 2013 Author Share Posted January 30, 2013 Fixed the default action issue. Now if 'install_action' is set to 'open', it should directly open the file. And now the script provides a unique uid every time it is invoked, so the results won't get reordered by Alfred. http://d.pr/f/lj1r also in AlfPT. Jono 1 Link to comment
ddjfreedom Posted February 3, 2013 Author Share Posted February 3, 2013 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 twinpeaks 1 Link to comment
ClintonStrong Posted March 19, 2013 Share Posted March 19, 2013 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
twinpeaks Posted March 20, 2013 Share Posted March 20, 2013 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
ClintonStrong Posted March 20, 2013 Share Posted March 20, 2013 (edited) 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 March 20, 2013 by Clinton Strong Link to comment
twinpeaks Posted March 20, 2013 Share Posted March 20, 2013 (edited) 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 March 20, 2013 by twinpeaks Link to comment
ddjfreedom Posted March 30, 2013 Author Share Posted March 30, 2013 (edited) 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 March 30, 2013 by ddjfreedom Link to comment
ddjfreedom Posted March 30, 2013 Author Share Posted March 30, 2013 http://d.pr/f/cC8w Updated to avoid writing config.yaml unnecessarily. This should fix the performance issue in the last version. Link to comment
twinpeaks Posted March 30, 2013 Share Posted March 30, 2013 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. Link to comment
ddjfreedom Posted March 31, 2013 Author Share Posted March 31, 2013 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? Link to comment
twinpeaks Posted March 31, 2013 Share Posted March 31, 2013 Got it working, thanks for confirming. Link to comment
ddjfreedom Posted April 1, 2013 Author Share Posted April 1, 2013 http://d.pr/f/nkhw Better performance on large number of files. Thanks, Clinton Strong. twinpeaks 1 Link to comment
ddjfreedom Posted April 3, 2013 Author Share Posted April 3, 2013 http://d.pr/f/yLXo Shows progress info for safari downloads (by Clinton Strong). Link to comment
graphorce Posted April 28, 2013 Share Posted April 28, 2013 Is there any easy way to expand the same behavior to other folders? For example, list recent files form ~/Desktop? Thanks a lot! Link to comment
greghoch Posted April 28, 2013 Share Posted April 28, 2013 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... Link to comment
ClintonStrong Posted April 28, 2013 Share Posted April 28, 2013 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
David Posted June 29, 2013 Share Posted June 29, 2013 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! Link to comment
ClintonStrong Posted June 29, 2013 Share Posted June 29, 2013 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
David Posted June 30, 2013 Share Posted June 30, 2013 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
lucasoldaini Posted October 7, 2013 Share Posted October 7, 2013 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
targumanu Posted October 7, 2013 Share Posted October 7, 2013 (edited) 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 October 7, 2013 by targumanu Link to comment
ClintonStrong Posted October 10, 2013 Share Posted October 10, 2013 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now