You are not logged in.

#226 2022-12-24 11:16:13

hully
Member
Registered: 2022-11-14
Posts: 87

Re: mimeo: open files by mimetype or file name

@Xyne

Thank you

1. The link in the first post of this thread (http://xyne.archlinux.ca/projects/mimeo) doesn't work anymore. The new link seems to be https://xyne.dev/projects/mimeo/.

2. Is there a (git or other VCS) repository for mimeo?

Offline

#227 2022-12-28 14:54:15

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,932
Website

Re: mimeo: open files by mimetype or file name

hully wrote:

1. The link in the first post of this thread (http://xyne.archlinux.ca/projects/mimeo) doesn't work anymore. The new link seems to be https://xyne.dev/projects/mimeo/.

Fixed, thanks.

hully wrote:

2. Is there a (git or other VCS) repository for mimeo?

It's on the way. I'm working through a TODO list for moving all of my projects to Gitlab and moving the website to Hugo but it's been slow due to limited free time.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#228 2023-01-09 09:35:22

hully
Member
Registered: 2022-11-14
Posts: 87

Re: mimeo: open files by mimetype or file name

Thanks.

How does mimeo infer mimetype?

I have STATA scripts with .do extension. They are text files to be opened with STATA.

Sometimes mimeo infer "text/x-csrc", but sometimes it infer "text/plain"

Offline

#229 2023-01-09 20:27:05

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,932
Website

Re: mimeo: open files by mimetype or file name

It uses Python's built-in MIME-types module and the "file" command, with an optional dependency on the "shared-mime-info" package.
Are you getting different results for the same file on the same system?
You could also try using regular expressions to obtain consistent results via the configuration file. See "mimeo --assoc-help" for details.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#230 2023-01-21 03:04:55

iojeda
Member
Registered: 2018-11-23
Posts: 3

Re: mimeo: open files by mimetype or file name

Hi @Xyne
Thanks for this amazing piece of software.
I was trying to do the vlc example in the documentation but I don't really understand how to do it.
I do apologize if this questions are too stupid but I don't understand how to configure mimeo properly

In Association File Examples you have this

vlc --one-instance --playlist-enqueue %U
  ^https?://(www.)?youtube.com/watch\?.*v=

I have added that to ~/.config/mimeo/associations.txt

But still can't open youtube links with vlc. What am I missing?

Last edited by iojeda (2023-01-21 03:06:00)

Offline

#231 2023-01-21 09:10:36

progandy
Member
Registered: 2012-05-17
Posts: 5,074

Re: mimeo: open files by mimetype or file name

What do you expect to happen?
This configuration is only for the mimeo command itself.
If you want to handle clicking a link in another application, then most should work if you replace xdg-open (e.g. install xdg-utils-mimeo from the AUR).
Browsers themselves do not ask the system how to open links, so for those you need to install addons.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#232 2023-02-17 10:06:03

hully
Member
Registered: 2022-11-14
Posts: 87

Re: mimeo: open files by mimetype or file name

I am reading `mimeo --filepath-help`

> Pass en empty argument to disable the check"

"en" should be "an".

What does it mean to disable the check? That `$HOME/.config/mimeo/associations.txt` is not read even if present?

> --term 'urxvt -e %s' --deprecated"

The double quote at the end should be removed

Offline

#233 2023-02-26 03:19:02

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,932
Website

Re: mimeo: open files by mimetype or file name

hully wrote:

What does it mean to disable the check? That `$HOME/.config/mimeo/associations.txt` is not read even if present?

Yes, the empty path will skip reading existing associations files (the previous sentence states that mimeo will check files for associations).

I have changed it to "Pass an empty string to skip existing files." and fixed the errors that you mentioned for the next release. Thanks for the feedback!


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB