Discussion:
introduction
kendell clark
2016-03-17 12:26:42 UTC
Permalink
hi all
My name is kendell clark, and I've been using linux for the past 5
years. I joined this list because I want to help improve the existing
mime database for a number of file types. I'd like to add the following
mime types: application/x-psp-rom, which will correspond to a psp
(playstation portable) game disk image. application/x-dtb, which will
correspond to a daisy digital talking book. This will be split up into
two types, one for daisy 2.02 books and one for daisy 3.0. I'd also like
to improve a number of game mime types by adding a unique string which
identifies that type of file, rather than depending on the file
extension alone. I'm completely new to all of this, so how would this be
done? Hex editor? The daisy mime types are also a challenge. The xml
tags are very similar to epub, in fact, many epub books contain some
daisy markup. I'd like some help with this if possible. The psp mime
type will be a little tricky since the file extension is usually .iso,
but I can add a unique string if I can find one. I love how linux can
uniquely identify gamecube and wii images this way. My last question
concerns a problem I've noticed. there are mime types for audio
players, cd drives, etc. Instead of showing up as these mime types when
inserted, orca says "unknown" when encountering them in computer://.
Thanks
Kendell Clark
Thomas Kluyver
2016-03-17 13:10:37 UTC
Permalink
Hi Kendell,
Post by kendell clark
I'm completely new to all of this, so how would this be
done? Hex editor?
The XDG Mime data is written in an XML format in the shared-mime-info
repository:
https://cgit.freedesktop.org/xdg/shared-mime-info/

That is then used to generate the binary indexes of mimetypes, so you
shouldn't need to edit those directly.

Thomas
kendell clark
2016-03-17 13:29:58 UTC
Permalink
hi
Thanks for your help. How would I go about getting a unique string of
data, integer, text string, whatever to add to the mime type to make it
unique? Most of the mime types I want to add are binary so can't be
opened in a traditional text editor, and I know little about hex
editors. I'd like to also improve xcontent/* mime types so that they're
more accurate, as far as I can tell by looking in mime-editor they have
directory structure matches set with a priority of 50, but nothing there
to match. That's in addition to my psp mime type and daisy dtb (digital
talking book) mime types.
Thanks
Kendell Clark
Post by Thomas Kluyver
Hi Kendell,
Post by kendell clark
I'm completely new to all of this, so how would this be
done? Hex editor?
The XDG Mime data is written in an XML format in the shared-mime-info
https://cgit.freedesktop.org/xdg/shared-mime-info/
That is then used to generate the binary indexes of mimetypes, so you
shouldn't need to edit those directly.
Thomas
_______________________________________________
xdg mailing list
https://lists.freedesktop.org/mailman/listinfo/xdg
Thomas Kluyver
2016-03-17 14:23:59 UTC
Permalink
Post by kendell clark
Thanks for your help. How would I go about getting a unique string of
data, integer, text string, whatever to add to the mime type to make it
unique? Most of the mime types I want to add are binary so can't be
opened in a traditional text editor, and I know little about hex
editors.
A hex editor is a good place to start. Usually, the main view is the hex
representation of the binary data (hex is handy because two hex digits
can represent any byte). Then surrounding that, you have views showing
what each part of the data could mean if interpreted as a string or as
different formats of numbers.

However, it's hard to identify a consistent and unique piece of data
just by looking at these, so ideally you should look for some
documentation describing the file format. There was a bug years ago
where printing from OpenOffice failed on a Tuesday, which turned out to
be because an insufficiently unique magic number was causing a file type
to be misidentified:
https://bugs.launchpad.net/ubuntu/+source/cupsys/+bug/255161
Post by kendell clark
I'd like to also improve xcontent/* mime types so that they're
more accurate, as far as I can tell by looking in mime-editor they have
directory structure matches set with a priority of 50, but nothing there
to match.
I don't know about that; hopefully someone else will be able to help you
with it.

Thomas

Loading...