Jump to content
ddjfreedom

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

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?

 

 

`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

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?

 

 

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

Share this post


Link to post

 

 

 

 

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

Share this post


Link to post

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

 

Share this post


Link to post

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

Share this post


Link to post

 

 
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!

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

The workflow will stop working if you have any file in Downloads with certain characters. If I have, for example, a file that has an  somewhere in the name, the whole workflow breaks.

Share this post


Link to post

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.

Share this post


Link to post

@ddjfreedom

 

Please replace your workflow in your introduction post with the working workflow here

So, nobody will have to scroll all this posts's thread  :)

 

@Clinton Strong 

Thank you for the fix!

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