Jump to content
phyllisstein

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

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

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!

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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!

Share this post


Link to post

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!

Share this post


Link to post

@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

Share this post


Link to post

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.

Share this post


Link to post

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

You lazy thing.

I've PM'd you about my downer woes (the addon, not drugs).

Share this post


Link to post

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.

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