[File] [PATCH] Magdir/frame FrameMaker MML; mime type and extension
Jörg Jenderek (GMX)
joerg.jen.der.ek at gmx.net
Fri Dec 8 00:40:41 UTC 2023
Hello,
some days ago i must handles some old software samples from Adobe
Framemaker. One file sort have file name suffix MML.
So i look on my systems for such files. When running file command
version 5.45 on such samples i get an output like:
chapfmt.mml: FrameMaker MML file
chaptxt.mml: FrameMaker MML file
formats.mml: FrameMaker MML file
sample.mml: FrameMaker MML file
With option --extension only 3 byte sequence ??? is shown and with -i
option application/x-mif is shown.
For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). My MML samples are
described as "FrameMaker Maker Markup Language" by mml-fm.trid.xml.
Here now application/vnd.framemaker mime type is shown. For file name
suffix mml is shown (See appended trid-v-mml.txt.gz).
For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). This
identifies no examples.
On Linux according to shared MIME-info database such samples are called
"Adobe FrameMaker document". Here also application/vnd.framemaker is
used as mime type and no file name suffix is shown. The samples are just
recognized by looking for 4 byte sequence <MML at the beginning. That
information can be seen in source freedesktop.org.xml.in found for
example on gitlab.freedesktop.org.
That informations are now expressed by comment line inside Magdir/frame
like:
# Reference: http://mark0.net/download/triddefs_xml.7z
# defs/m/mml-fm.trid.xml
The description happens by lines inside Magdir/frame like:
0 string \<MML FrameMaker MML file
!:mime application/x-mif
So this now becomes like:
0 string \<MML FrameMaker MML file
>5 string >0 (%-0.4s)
!:mime application/vnd.framemaker
!:ext mml
In 2 of my examples (formats.mml sample.mml) after that directive comes
a space character and a version string like 1.00 and more text. But in 2
of my examples (chapfmt.mml chaptxt.mml) the directive is terminated by
greater sign and end of line. So now show version information if available.
After applying the above mentioned modifications by patch
file-5.45-mml-bfont.diff then all my inspected samplesare still
described but now also possible version inforation is shown. This now
looks like:
chapfmt.mml: FrameMaker MML file
chaptxt.mml: FrameMaker MML file
formats.mml: FrameMaker MML file (1.00)
sample.mml: FrameMaker MML file (1.00)
I hope my diff file can be applied in future version of file
utility.
With best wishes,
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-mml.txt.gz
Type: application/x-gzip
Size: 377 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20231208/e2f48f63/attachment.bin>
-------------- next part --------------
--- file-5.45/magic/Magdir/frame.old 2021-02-23 01:49:24.000000000 +0100
+++ file-5.45/magic/Magdir/frame 2023-12-08 01:34:06.445079100 +0100
@@ -46,4 +46,13 @@
>17 string 1.01 (%s)
+# Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mml-fm.trid.xml
+# Update: Joerg Jenderek 2023 Nov
+# Note: called "FrameMaker Maker Markup Language" by TrID and
+# "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org
0 string \<MML FrameMaker MML file
-!:mime application/x-mif
+#!:mime text/plain
+#!:mime application/x-mif
+!:mime application/vnd.framemaker
+!:ext mml
+# Note: sometimes followed by space and version like 1.00 (formats.mml sample.mml) and more text
+>5 string >0 (%-0.4s)
0 string \<BookFile FrameMaker Book file
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.45-frame-mml.diff.sig
Type: application/octet-stream
Size: 636 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20231208/e2f48f63/attachment.obj>
More information about the File
mailing list