Jump to content

Downer: Tag, Label, Delete, and Open Downloads


Recommended Posts

Hello, fellow workers of flow! I've just thrown together a new workflow for managing your Downloads folder. Right now, it lists recent downloads, allowing you to open them (press Return), delete them (press Ctrl+Return), set their OpenMeta tags (press ⌥+Return, enter a list separated by spaces), and set their Finder label colors (press ⌘+Return).

 

You can download it here. Be sure to let me know if anything breaks!

Edited by phyllisstein
Link to comment

Awesome workflow,

 

what would be great would be an "Autosort" option using user defined rules that (rather than deleting the file) would put the file in a particular folder depending on its extension (.pdf / .mp3 / etc.  )

Link to comment

Might be an issue at my end but the d/l link and screenshots are all borked.

 

Screenie - http://d.pr/i/vcM

 

 

Yeah, obviously a few hiccups right now with the hosting. @phyllisstein - Please let us know when the file is up again so we can down downer. Eh, tease... ;)

 

Hah, sorry about that—I switched hosts and kept having to reconfigure from scratch. As God is my witness, never another custom mail server again ever. Should be consistently back up now.

 

 

 

Awesome workflow,

 

what would be great would be an "Autosort" option using user defined rules that (rather than deleting the file) would put the file in a particular folder depending on its extension (.pdf / .mp3 / etc.  )

 

I thought about that, but I think there may be a fine line between killing an afternoon avoiding finals and totally rewriting Hazel.

Link to comment

Maybe there is something in my Downloads folder that the workflow does not enjoy that much. After the keyword dl I see Alfred search which tells there was an error:

Traceback (most recent call last):
  File "feedback.py", line 70, in <module>
    do_feedback()
  File "feedback.py", line 27, in do_feedback
    downloads = find_downloads()
  File "feedback.py", line 20, in find_downloads
    color = get_finder_label(path)
  File "/Users/Carlos/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3A9F6317-CC0B-4D14-9CEC-69417CA8389B/labels.py", line 21, in get_finder_label
    flags = get_flags(path)
  File "/Users/Carlos/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3A9F6317-CC0B-4D14-9CEC-69417CA8389B/labels.py", line 8, in get_flags
    path = path.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 39: ordinal not in range(128)

Nice idea!

Link to comment

Maybe there is something in my Downloads folder that the workflow does not enjoy that much. After the keyword dl I see Alfred search which tells there was an error:

Traceback (most recent call last):
  File "feedback.py", line 70, in <module>
    do_feedback()
  File "feedback.py", line 27, in do_feedback
    downloads = find_downloads()
  File "feedback.py", line 20, in find_downloads
    color = get_finder_label(path)
  File "/Users/Carlos/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3A9F6317-CC0B-4D14-9CEC-69417CA8389B/labels.py", line 21, in get_finder_label
    flags = get_flags(path)
  File "/Users/Carlos/Dropbox/Alfred 2/Alfred.alfredpreferences/workflows/user.workflow.3A9F6317-CC0B-4D14-9CEC-69417CA8389B/labels.py", line 8, in get_flags
    path = path.encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcc in position 39: ordinal not in range(128)

Nice idea!

 

Jaysus, I can never seem to get this Unicode stuff right. I've just uploaded a new version to http://alfred.daniel.sh/Workflows/Downer.alfredworkflow that MAY fix the problem, but it's sort of a shot in the dark—ctypes confuse me to begin with, and the encoding stuff just makes it worse.

Link to comment

Couldn't figure out why this wasn't working, then realised I had YouTube Downloader enabled, which uses ‘dl’ too... What's the etiquette for authors using the same keyword? Cage fight?

YouTube d/ler is getting ydl assigned to it on this box, as that makes more intuitive sense. 

Edit: No functionality as of yet, I'm guessing there's something odd in my Downloads folder. I considered posting the output of 

ls -l ~/Downloads > downloads.txt

but, well, no.

Edited by jdkram
Link to comment

Jaysus, I can never seem to get this Unicode stuff right. I've just uploaded a new version to http://alfred.daniel.sh/Workflows/Downer.alfredworkflow that MAY fix the problem, but it's sort of a shot in the dark—ctypes confuse me to begin with, and the encoding stuff just makes it worse.

 

Hi,

 

I get also this error even using latest version:

Traceback (most recent call last):
  File "feedback.py", line 70, in <module>
    do_feedback()
  File "feedback.py", line 27, in do_feedback
    downloads = find_downloads()
  File "feedback.py", line 20, in find_downloads
    color = get_finder_label(path)
  File "/Users/vincent/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.B5B20723-8BA6-4474-A39C-232E58FD7975/labels.py", line 21, in get_finder_label
    flags = get_flags(path)
  File "/Users/vincent/Dropbox/Alfred.alfredpreferences/workflows/user.workflow.B5B20723-8BA6-4474-A39C-232E58FD7975/labels.py", line 8, in get_flags
    path = unicode(path).encode("utf-8")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 55: ordinal not in range(128)

I've never used python myself, so can't help much, but I've found this article http://blog.webforefront.com/archives/2011/02/python_ascii_co.html which appears to provide solutions :-)

 

My 2 cents

Thanks!

Link to comment

Thanks for going to the trouble of looking up an article about it. That would work great if I just needed to print or manipulate the content, but there's a Python module called ctypes that complicates things a bit.

 

I'm in the middle of finals right now, but I should be able to try something in a day or two. Sorry for the delay and the ajada!

Link to comment

@jkdram: The forum breaks every time I try to quote your post for some reason, but I keep trying to say that we should be able to solve this without listing all your downloads. Could you check the workflow folder for any .log files and either post their content here (they shouldn't contain anything sensitive) or e-mail them to me at d-at-daniel-dot-sh?

Edited by phyllisstein
Link to comment

At the moment, it looks at all the individual files contained within any folders that you've downloaded or created. I may adjust that behavior, since it's not quite how I'd personally want it to behave either, but I'd like to get the UTF-8 issues straightened out first.

Link to comment
  • 2 weeks later...
  • 2 months later...

Yeah… I've been playing musical chairs with Web servers again, and things aren't always coming back online fast. Although it's actually sort of salutary, since I no longer plan on maintaining my workflows or the website where they used to live. You can find them, including this one, on GitHub at https://github.com/phyllisstein/Workflows—but they're no longer actively supported or updated.

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