Jump to content

Recent Downloads with Feedback


Recommended Posts

 

 
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.

 

 

`load': cannot load such file -- alfred_feedback.rb (LoadError)

 

(alfred_feedback.rb is present in the workflow's folder)

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?

 

 

`load': cannot load such file -- alfred_feedback.rb (LoadError)

 

(alfred_feedback.rb is present in the workflow's folder)

 

 

I tried resolving the file paths to absolute paths. Let me know if that fixes it for you: Recent Downloads

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?

 

 

When tested in Terminal, alfred_feedback.rb now seems to generate proper XML, but I still get no feedback in Alfred.

 

I think I got it fixed: Recent Downloads

 

If it works for you without any problems, I'll go ahead and submit a pull request so ddjfreedom can update the workflow with the fixes. (The problem was the way Ruby handles string encoding in 2.0 vs 1.8.7. Had to explicitly set the string encoding to UTF-8 to get it working properly.)

Edited by Clinton Strong
Link to comment

 

 

 

 

I think I got it fixed: Recent Downloads

 

If it works for you without any problems, I'll go ahead and submit a pull request so ddjfreedom can update the workflow with the fixes. (The problem was the way Ruby handles string encoding in 2.0 vs 1.8.7. Had to explicitly set the string encoding to UTF-8 to get it working properly.)

 

 

It generates feedback now, but strangely, shows only about 10 video files (mp4/m4v), and definitely not the most recent ones

Link to comment

Thanks for your workflow.

 

I've been wondering, is it possible to *not* hide/close the Alfred window when i delete/move an item to the trash?

It would then be easier to delete multiple items. Currently if you want to delete 3 items, you have to reopen Alfred 3 times...

 

Link to comment

I've been wondering, is it possible to *not* hide/close the Alfred window when i delete/move an item to the trash?

It would then be easier to delete multiple items. Currently if you want to delete 3 items, you have to reopen Alfred 3 times...

 

You could use Alfred's file buffer for that. See Features > File Search > Buffer in Alfred preferences for options.

 

Edited by targumanu
Link to comment
  • 2 weeks later...

 

 
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.

 

Thanks for the fix

 

 

 

 

 

I think I got it fixed: Recent Downloads

 

If it works for you without any problems, I'll go ahead and submit a pull request so ddjfreedom can update the workflow with the fixes. (The problem was the way Ruby handles string encoding in 2.0 vs 1.8.7. Had to explicitly set the string encoding to UTF-8 to get it working properly.)

 

Thanks for the fix, everything seems to work fine for me!

Link to comment

Whit the fix is working here (Mavericks)

 

a question:

Is there a way to keep the window open after delete a file in the recent downloads?

 

I think it could be useful cause many times I need to delete more than one file in my downloads folder and It would be so fast with this workflow

Link to comment
  • 1 month later...

I think my most used workflow is telling me to upgrade to Mavericks already! I was running smooth for so long with this workflow and Mountain Lion (10.8) - Still haven't upgraded but at least the error output is consistent against all the builds I have tried. 

 

❯ /usr/bin/ruby recent_downloads.rb " "
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date/format.rb:1055:in `dup': can't dup NilClass (TypeError)
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/date/format.rb:1055:in `_parse'
    from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/time.rb:240:in `parse'
    from recent_downloads.rb:65
    from recent_downloads.rb:6:in `map'
    from recent_downloads.rb:6:in `each'
    from recent_downloads.rb:6:in `each_with_index'
    from recent_downloads.rb:61:in `each'
    from recent_downloads.rb:61:in `each_with_index'
    from recent_downloads.rb:61:in `each'
    from recent_downloads.rb:61:in `map'
    from recent_downloads.rb:61

Mr. Clinton Strong, if you have a spare minute in the next few weeks and it's truly not much work to solve this error I would greatly appreciate the help or any advice.

 

I have no clue where to start considering I did not upgrade my OS, still using 10.8 and it's linked to system ruby... weird because even throwing homebrew's ruby in the default path of `/usr/local/bin/ruby` I receive the same error and it's ruby 2.0.0p353 (2013-11-22 revision 43784)  so the utf-8 error you mention I thought might be good to go with that version but similar error, I am sure totally different but they look similar to me..

❯ /usr/local/bin/ruby recent_downloads.rb " "
/usr/local/Cellar/ruby/2.0.0-p353/lib/ruby/2.0.0/time.rb:325:in `_parse': no implicit conversion of nil into String (TypeError)
    from /usr/local/Cellar/ruby/2.0.0-p353/lib/ruby/2.0.0/time.rb:325:in `parse'
    from recent_downloads.rb:65:in `block in <main>'
    from recent_downloads.rb:61:in `each'
    from recent_downloads.rb:61:in `each_with_index'
    from recent_downloads.rb:61:in `each'
    from recent_downloads.rb:61:in `map'
    from recent_downloads.rb:61:in `<main>'

Anyways, thanks  and so I am not a complete mooch I will attempt to help the folks wanting the window to stay open after file deletion action modifer script...and my answer , albeit ill-advised answer would have to be no, you can't have the window stay open after an item is deleted but you could probably have it quickly flash by pre-populating an applescript, via osascript... tied to run after the rm recursive script...

 

I would imagine tying that to a variable  to run with quickly thrown together NOT tested but could work (just use a hotkey) but maybe this will get you started...

tell application "Alfred 2" to search "recent"

through osascript and bash... I know there are tons of variants, this template has worked in the past for me, hope it helps I would recommend a hotkey as it is much easier, more reliable, native, and very fast as the route to go.

showAlfred=`osascript <<END
tell application "Safari" to set theURL to URL of front document
tell application "Alfred 2" to search "recent"
end try
end tell
END
`
rm -rf {query} && $showAlfred

3rd time, i repeat, not tested but shouldn't be "dangerous" but recursive remove command is a bit scary so I hate to have anybody lose work because I falsely represented this as a proper solution.

Link to comment

There you go teaching me something new again. I have hazel set to Archive downloaded files every 3-4 days and then sort them by by date added in ~/downloads/archives/* and your right. The workflow is perfect now that the file was moved/archived by hazel but I guess ignorance with a bad archiving setup combined with bad luck of having a couple days left before the downloads get sorted into daily folders left me thinking I had a major problem.

 

Long story short, I appreciate you taking the time to reply with this golden nugget of knowledge. I honestly probably would never, at least not until I finally use Mavericks full time, have given the workflow another short or tried to remedy the problem. Luckily it was a problem that was ultimately easy to fix and mostly perceived as a problem even when it was no longer affecting the workflow. 

 

Thank you sir for the specific help related to my problem above, pretty good when you don't even have to fix anything just told me to give it another shot. Workflow magic?Anyhow, you do deserve a huge thanks for keeping your workflows in pristine shape, source and zipped workflows are updated constantly for minor fixes and lots of large ones. Always enjoy receiving those notifications. Cheers and keep claiming the "most updated repo of alfred workflows known to man." Take it easy bud.

Link to comment
  • 4 months later...

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