Package Details: mimeo 2023-13

Git Clone URL: https://aur.archlinux.org/mimeo.git (read-only, click to copy)
Package Base: mimeo
Description: Open files by MIME-type or file name using regular expressions.
Upstream URL: https://xyne.dev/projects/mimeo
Keywords: utilities
Licenses: GPL
Submitter: Xyne
Maintainer: Xyne
Last Packager: Xyne
Votes: 148
Popularity: 0.31
First Submitted: 2009-12-16 02:54 (UTC)
Last Updated: 2024-05-17 23:43 (UTC)

Latest Comments

« First ‹ Previous 1 .. 6 7 8 9 10 11 12 Next › Last »

xduugu commented on 2011-02-10 11:25 (UTC)

Thanks a lot. Fast as usual. 8)

Xyne commented on 2011-02-10 11:06 (UTC)

@xduugu Error codes have been implemented. It now exits with 1 at the end of the operation if any argument generates an error.

xduugu commented on 2011-02-09 14:10 (UTC)

Could you implement error codes in future releases? Currently, you cannot tell if mimeo managed to handle the input or not. Thanks. $ mimeo blah error: no associations for MIMEtype ERROR: cannot open `/blah' (No such file or directory) $ echo $? 0 $ mimeo http://google.com error: no associations for MIMEtype application/x-msdos-program $ echo $? 0

ammon commented on 2011-02-05 00:43 (UTC)

Yep, that fixes it. Thanks.

Xyne commented on 2011-02-05 00:13 (UTC)

@ammon It should work now. It was probably caused by an empty line in one of the MIME cache files. If will now skip those. If it was caused by a malformed line then it will print a warning to STDERR.

ammon commented on 2011-02-04 17:43 (UTC)

I got this after update yesterday. Traceback (most recent call last): File "/usr/bin/mimeo", line 5, in <module> Mimeo.main() File "/usr/lib/python2.7/site-packages/Mimeo.py", line 603, in main mimeo = Mimeo(options.term) File "/usr/lib/python2.7/site-packages/Mimeo.py", line 166, in __init__ self.load_mimeinfo() File "/usr/lib/python2.7/site-packages/Mimeo.py", line 242, in load_mimeinfo self.load_mime_cache(fpath) File "/usr/lib/python2.7/site-packages/Mimeo.py", line 293, in load_mime_cache mimetype, desktops = map(lambda x: x.strip(), line.split('=', 1)) ValueError: need more than 1 value to unpack I wanted to downgrade, to 2010.11 but package is no longer in your repo Xyne.

Schnouki commented on 2011-02-03 11:56 (UTC)

Thanks for the explanation, this makes sense now :) And thanks for fixing it so quickly!

Xyne commented on 2011-02-03 11:36 (UTC)

That should have been: def curry(cmd, regex)   def fun(arg):     ...   return fun

Xyne commented on 2011-02-03 11:31 (UTC)

I think I discovered that error before but I re-introduced it when I refactored the code. I originally had a separate top-level function, something like def curry(cmd, regex): def fun(arg): ... return fun I had forgotten why I did that and I thought it could be replaced by a local function definition. I only tested the code with a single line in the association file so I missed the error. I don't understand why the local definitions all point to the same function either. I have applied your changes as I think that is a better approach than recreating the top-level currying function. Thanks for the patch. :)

Schnouki commented on 2011-02-03 10:08 (UTC)

Thanks for the fix! :) The other error still happens for me, but I have a patch that fixes it. Apparently there is an issue with the "fun(arg)" functions defined in parse_association_file(). If you add a "print cmd, regex" inside, you will notice that when they are called (from parse_association_file()), they all have cmd=[last command from ~/.config/mimeo.conf] and regex=[last regex from ~/.config/mimeo.conf]. I don't understand why (I basically agree with your approach), but so it is. Little demo: Here is my mimeo.conf: https://github.com/Schnouki/dotfiles/blob/master/mimeo.conf $ mimeo http://google.fr /usr/bin/thunderbird -compose ^mailto: /usr/bin/thunderbird -compose ^mailto: /usr/bin/thunderbird -compose ^mailto: /usr/bin/thunderbird -compose ^mailto: /usr/bin/thunderbird -compose ^mailto: /usr/bin/thunderbird -compose ^mailto: error: no associations for MIMEtype ERROR: cannot open `/home/schnouki/http:/google.fr' (No such file or directory) Here is my patch: http://pastebin.com/Kj7wBeuN It replaces the "fun()" function by a simple (cmd, regex) tuple, which works flawlessly for me.