Discussion:
adding mime types for braille documents
kendell clark
2016-04-18 05:44:43 UTC
Permalink
hi all
I'd like to add mime types for braille documents (*.brf and *.brl)
files. I've generated a test braille file using liblouis's lou_translate
tool, which I can attach if wanted. It reads, This is a test of a
braille document. Testing, 1, 2, 3. I can file a bug against the shared
mime database if needed, but I seem to be stuck on the last bug I filed.
I'm not really clear on what I need to do to get new mime types
accepted. I've read the hacking file but I don't really understand it.
I've checked out the shared-mime-database git repository and I'd be
happy to put my test braille file in the tests folder, but I don't know
how to run the tests against it since braille documents are nothing more
than text files with braille in them as opposed to print, so there's no
standard or anything. Can anyone help me? In fact, if braille documents
get their own mime type, they'd be a subclass of text files. I'm still
trying to add mime types for audible and enhanced audible files, but I
don't know how to generate test audible files. There doesn't seem to be
a library that will generate them. I can take a preexisting audible file
and remove the audio from it, but I'm not sure how to do that. Sorry for
all the questions, I'm new to the world of mimetypes, magic numbers, and
so on. If there's pre existing documentation, point me to it and I'll
read it and get out of you guys' hair. I don't want to be a bother but I
do want to improve linux, and the mime types available for it, which is
why I joined this list.
Thanks
Kendell Clark
kendell clark
2016-04-18 07:14:30 UTC
Permalink
hi
I've bookmarked the iana registration application. But I'm going to need
some help filling this out, because some of the details they want are so
far over my head I don't understand them. Would someone be willing to
either fill an application out for me or explain it a bit better? For
braille documents, there is no standard. It's simply a plain text file,
but instead of ascii text, it's braille text, which is basically ascii
that, when run through a braille translator, turns into print text. It
should be a subclass of text/plain, since it is basically a text file.
On the audible files ... I have literally no idea. Once I understand
this I'll be able to add new media types without bothering anyone, but I
seem to get part way into adding one and then get stuck. If I understand
correctly, the way to get new media types is to first register them with
iana, then they'll get added hear? If this is the case, why aren't the
console rom formats registered? Application/x-wii-rom, etc?
Thanks
Kendell Clark
Post by kendell clark
hi all
I'd like to add mime types for braille documents (*.brf and *.brl)
files. I've generated a test braille file using liblouis's lou_translate
tool, which I can attach if wanted. It reads, This is a test of a
braille document. Testing, 1, 2, 3. I can file a bug against the shared
mime database if needed, but I seem to be stuck on the last bug I filed.
I'm not really clear on what I need to do to get new mime types
accepted. I've read the hacking file but I don't really understand it.
I've checked out the shared-mime-database git repository and I'd be
happy to put my test braille file in the tests folder, but I don't know
how to run the tests against it since braille documents are nothing more
than text files with braille in them as opposed to print, so there's no
standard or anything. Can anyone help me? In fact, if braille documents
get their own mime type, they'd be a subclass of text files. I'm still
trying to add mime types for audible and enhanced audible files, but I
don't know how to generate test audible files. There doesn't seem to be
a library that will generate them. I can take a preexisting audible file
and remove the audio from it, but I'm not sure how to do that. Sorry for
all the questions, I'm new to the world of mimetypes, magic numbers, and
so on. If there's pre existing documentation, point me to it and I'll
read it and get out of you guys' hair. I don't want to be a bother but I
do want to improve linux, and the mime types available for it, which is
why I joined this list.
Thanks
Kendell Clark
Bastien Nocera
2016-04-18 09:25:42 UTC
Permalink
Post by kendell clark
hi
I've bookmarked the iana registration application. But I'm going to need
some help filling this out, because some of the details they want are so
far over my head I don't understand them. Would someone be willing to
either fill an application out for me or explain it a bit better?
There's no need to register the document type with the IANA to have it
accepted in shared-mime-info. This is usually only something that the
creator of the file type does anyway.
Post by kendell clark
For
braille documents, there is no standard. It's simply a plain text file,
but instead of ascii text, it's braille text, which is basically ascii
that, when run through a braille translator, turns into print text. It
should be a subclass of text/plain, since it is basically a text file.
How does one detect those filetypes given only the data? What does one
look like? That's the question.

<snip>
Post by kendell clark
If I understand
correctly, the way to get new media types is to first register them with
iana, then they'll get added hear? If this is the case, why aren't the
console rom formats registered? Application/x-wii-rom, etc?
Charles is wrong, you don't need to have them registered. In fact, the
"x-" prefix says it's not registered.
kendell clark
2016-04-18 09:29:03 UTC
Permalink
hi
I think that in this case we go purely off of the file extension.
Braille files have ending extensions of either .brf or .brl. I'll
attach two files to this message, both very small. One will be the
braille file, ending in brf. The other will be the same file run through
a braille translator, and will end in .txt. Maybe you can see something
in it I can't? I am new at this, so it's definitely possible.
Thanks
Kendell Clark
Post by Bastien Nocera
Post by kendell clark
hi
I've bookmarked the iana registration application. But I'm going to need
some help filling this out, because some of the details they want are so
far over my head I don't understand them. Would someone be willing to
either fill an application out for me or explain it a bit better?
There's no need to register the document type with the IANA to have it
accepted in shared-mime-info. This is usually only something that the
creator of the file type does anyway.
Post by kendell clark
For
braille documents, there is no standard. It's simply a plain text file,
but instead of ascii text, it's braille text, which is basically ascii
that, when run through a braille translator, turns into print text. It
should be a subclass of text/plain, since it is basically a text file.
How does one detect those filetypes given only the data? What does one
look like? That's the question.
<snip>
Post by kendell clark
If I understand
correctly, the way to get new media types is to first register them with
iana, then they'll get added hear? If this is the case, why aren't the
console rom formats registered? Application/x-wii-rom, etc?
Charles is wrong, you don't need to have them registered. In fact, the
"x-" prefix says it's not registered.
kendell clark
2016-04-18 19:54:53 UTC
Permalink
hi
I can try contacting duxbury, but in my experience they're very ...
windows centric. I'd probably mention in my email that I want to improve
the "linux desktop" and at that point they'd lose all interest. But I'll
try anyway, I won't go off of assumption on this one. At least the brf
format is open, and has a dtd. Duxbury was, I thought, a very
proprietary company. I'm trying to find out if the brf format is
registered. I can't seem to find it, so I'm assuming not. Would the mime
type be something like text/braille?
Thanks
Kendell Clark
Post by Bastien Nocera
Charles is wrong, you don't need to have them registered. In fact, the
"x-" prefix says it's not registered.
Hi Bastien,
I wrote "can be registered to the IANA", not "need to". I am sorry
if it has been confusing.
Registering to the IANA is a nice thing to do as it will benefit a broader
audience than the users of XDG-compliant desktop environment. And indeed, as
you wrote, this registration is often done by the creators of the file type.
In the case of the "BRF" format, it seems to be "Duxbury systems".
http://www.duxburysystems.com/documentation/dbt11.1/brf_files.htm
Perhaps they would be pleased to do the registration if they were contacted by
Kendell ?
The IANA has recently became much more opened to registration of new types,
to the point that they now discourage the use of "x-" prefixes.
- https://tools.ietf.org/html/rfc6838#section-3.4
- https://tools.ietf.org/html/rfc6648
I tested the new registration system myself, with
application/vnd.debian.binary-package, and this media type made its way in
shared-mime-info shortly after acceptance (thanks to the maintainer of Fedora's
package "mailcap", who was faster than me to submit an update to you). So in
case submission to the IANA seems to be doable, I think that it is the most
beneficial way to go.
Have a nice day,
Jerome Leclanche
2016-04-18 19:59:19 UTC
Permalink
If it's a proprietary format, it should be text/vnd.duxbury.brf or some such.

If it's an open format, text/brf is likely fine.

It's worth noting I'm seeing references to text/plain encoding=brf...
which doesn't seem correct.
https://bz.apache.org/bugzilla/show_bug.cgi?id=41240
J. Leclanche
Post by kendell clark
hi
I can try contacting duxbury, but in my experience they're very ...
windows centric. I'd probably mention in my email that I want to improve
the "linux desktop" and at that point they'd lose all interest. But I'll
try anyway, I won't go off of assumption on this one. At least the brf
format is open, and has a dtd. Duxbury was, I thought, a very
proprietary company. I'm trying to find out if the brf format is
registered. I can't seem to find it, so I'm assuming not. Would the mime
type be something like text/braille?
Thanks
Kendell Clark
Post by Bastien Nocera
Charles is wrong, you don't need to have them registered. In fact, the
"x-" prefix says it's not registered.
Hi Bastien,
I wrote "can be registered to the IANA", not "need to". I am sorry
if it has been confusing.
Registering to the IANA is a nice thing to do as it will benefit a broader
audience than the users of XDG-compliant desktop environment. And indeed, as
you wrote, this registration is often done by the creators of the file type.
In the case of the "BRF" format, it seems to be "Duxbury systems".
http://www.duxburysystems.com/documentation/dbt11.1/brf_files.htm
Perhaps they would be pleased to do the registration if they were contacted by
Kendell ?
The IANA has recently became much more opened to registration of new types,
to the point that they now discourage the use of "x-" prefixes.
- https://tools.ietf.org/html/rfc6838#section-3.4
- https://tools.ietf.org/html/rfc6648
I tested the new registration system myself, with
application/vnd.debian.binary-package, and this media type made its way in
shared-mime-info shortly after acceptance (thanks to the maintainer of Fedora's
package "mailcap", who was faster than me to submit an update to you). So in
case submission to the IANA seems to be doable, I think that it is the most
beneficial way to go.
Have a nice day,
_______________________________________________
xdg mailing list
https://lists.freedesktop.org/mailman/listinfo/xdg
kendell clark
2016-04-18 20:38:54 UTC
Permalink
hi
Hmm, encoding=brf? That's odd. Do brf files have their own encoding? I'm
not sure. I now need to get my hands on some keyWord braille and keyWord
text files from a braille note to add support for those lol. Don't mind
me, I run away with ideas sometimes.
Thanks
Kendell Clark
Post by Jerome Leclanche
If it's a proprietary format, it should be text/vnd.duxbury.brf or some such.
If it's an open format, text/brf is likely fine.
It's worth noting I'm seeing references to text/plain encoding=brf...
which doesn't seem correct.
https://bz.apache.org/bugzilla/show_bug.cgi?id=41240
J. Leclanche
Post by kendell clark
hi
I can try contacting duxbury, but in my experience they're very ...
windows centric. I'd probably mention in my email that I want to improve
the "linux desktop" and at that point they'd lose all interest. But I'll
try anyway, I won't go off of assumption on this one. At least the brf
format is open, and has a dtd. Duxbury was, I thought, a very
proprietary company. I'm trying to find out if the brf format is
registered. I can't seem to find it, so I'm assuming not. Would the mime
type be something like text/braille?
Thanks
Kendell Clark
Post by Bastien Nocera
Charles is wrong, you don't need to have them registered. In fact, the
"x-" prefix says it's not registered.
Hi Bastien,
I wrote "can be registered to the IANA", not "need to". I am sorry
if it has been confusing.
Registering to the IANA is a nice thing to do as it will benefit a broader
audience than the users of XDG-compliant desktop environment. And indeed, as
you wrote, this registration is often done by the creators of the file type.
In the case of the "BRF" format, it seems to be "Duxbury systems".
http://www.duxburysystems.com/documentation/dbt11.1/brf_files.htm
Perhaps they would be pleased to do the registration if they were contacted by
Kendell ?
The IANA has recently became much more opened to registration of new types,
to the point that they now discourage the use of "x-" prefixes.
- https://tools.ietf.org/html/rfc6838#section-3.4
- https://tools.ietf.org/html/rfc6648
I tested the new registration system myself, with
application/vnd.debian.binary-package, and this media type made its way in
shared-mime-info shortly after acceptance (thanks to the maintainer of Fedora's
package "mailcap", who was faster than me to submit an update to you). So in
case submission to the IANA seems to be doable, I think that it is the most
beneficial way to go.
Have a nice day,
_______________________________________________
xdg mailing list
https://lists.freedesktop.org/mailman/listinfo/xdg
Bastien Nocera
2016-04-18 09:27:54 UTC
Permalink
I'm still> don't know how to generate test audible files. There doesn't seem to be
a library that will generate them. I can take a preexisting audible file
and remove the audio from it, but I'm not sure how to do that.
You wouldn't do that. The file magic is likely at the start of the
file, so taking the first couple of kilobytes from the file is usually
enough to have a test file. For example, with a file called "foo.bin"

dd if=foo.bin of=audible-file-test.bin count=1 bs=2k

Cheers
kendell clark
2016-04-18 09:31:17 UTC
Permalink
hi
Thanks a lot for that. I'll cut off the first megabyte, and see if I
can't find the magic. I got the magic number from the ffmpeg source
code, and the number series is in the bug report I filed, but I'll try
to generate a test file. I don't have commit access to shared mime info
though, so should I attach my test file to the list and have someone
look over it and commit if it passes?
Thanks
Kendell Clark
Post by Bastien Nocera
I'm still> don't know how to generate test audible files. There doesn't seem to be
a library that will generate them. I can take a preexisting audible file
and remove the audio from it, but I'm not sure how to do that.
You wouldn't do that. The file magic is likely at the start of the
file, so taking the first couple of kilobytes from the file is usually
enough to have a test file. For example, with a file called "foo.bin"
dd if=foo.bin of=audible-file-test.bin count=1 bs=2k
Cheers
Bastien Nocera
2016-04-18 09:34:25 UTC
Permalink
Post by kendell clark
hi
Thanks a lot for that. I'll cut off the first megabyte, and see if I
can't find the magic. I got the magic number from the ffmpeg source
code, and  the number series is in the bug report I filed, but I'll
try
to generate a test file. I don't have commit access to shared mime info
though, so should I attach my test file to the list and have someone
look over it and commit if it passes?
You'd add it to the git formatted patch, and attach the patch to the
freedesktop bugzilla.
kendell clark
2016-04-18 09:39:22 UTC
Permalink
hi
No problem, can do. I'm a little new at git but I believe I know how to
do that. It's git format-patch, followed by the commit id, right?
Thanks
Kendell Clark
Post by Bastien Nocera
Post by kendell clark
hi
Thanks a lot for that. I'll cut off the first megabyte, and see if I
can't find the magic. I got the magic number from the ffmpeg source
code, and the number series is in the bug report I filed, but I'll try
to generate a test file. I don't have commit access to shared mime info
though, so should I attach my test file to the list and have someone
look over it and commit if it passes?
You'd add it to the git formatted patch, and attach the patch to the
freedesktop bugzilla.
Loading...