#------------------------------------------------------------------------------ # $File: frame,v 1.19 2024/03/04 00:34:31 christos Exp $ # frame: file(1) magic for FrameMaker files # # This stuff came on a FrameMaker demo tape, most of which is # copyright, but this file is "published" as witness the following: # # URL: https://en.wikipedia.org/wiki/Adobe_FrameMaker # # Update: Joerg Jenderek 2024 Mar # URL: http://fileformats.archiveteam.org/wiki/FrameMaker # Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fm.trid.xml # Note: called "FrameMaker document" by TrID and "Adobe FrameMaker document" by shared MIME-info database # skip "text" DROID samples like: fmt-190-signature-id-840.fm fmt-533-signature-id-837.fm fmt-534-signature-id-838.fm fmt-535-signature-id-839.fm fmt-536-signature-id-841.fm # fmt-537-signature-id-842.fm fmt-538-signature-id-843.fm fmt-539-signature-id-844.fm x-fmt-302-signature-id-395.fm 0 string/b \11 string x (%0.3s # before closing directive ">" is appended version letter like: F H J K Q Y >>14 ubyte >0x40 %c # or last digit of 4 character version string >>14 ubyte <0x41 \b%c # test again so that next default clause works >14 ubyte x # Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hlp-fm.trid.xml # Note: called "FrameMaker Help" by TrID # look for reference to FrameMaker help name suffix like in: index1.hlp >>18 search/9688/s .hlp: \b) help # the internal FrameMaker help are just FrameMaker document with hlp suffix; XREF.HLP is same as Xref-hlp.fm !:ext hlp # For control reason show link name like: # "Overview" "lastpage "firstpage "Add File" "Conditional Text" "Table Format" "Creating a reference frame" "firstpageCov" "Spot Colors" "Selecting text" "proceduresbl" "lastpageu" "Introducing HelpHe" "Menu of Syntax Descriptions" "Main FrameMaker window" #>>>&5 string x LINK_NAME "%s" >>>&5 string x # look for gotolink or openlink keyword before help file name >>>&-18 search/18/s link\040 # link construct with help name like: "gotolink xref.hlp:Overview" "openlink syntax1.hlp:firstpage" >>>>&-4 regex/s =^\[A-Za-z0-9.:\040]{1,} with "%s" # if not FrameMaker Help assume it is "normal" FrameMaker document # shown with closing parenthesis to get look like in frame,v 1.18 >>18 default x \b) # sometimes without suffix like: CHAPTER HARVARD LETTER MEMO1 NEWSLTR REPORT3 # no samples found with .bk or .book extension # allchaps.ix (Framemaker Index) and others like: # title.fm4 wp.filt textre1.htr pmscript.ind change.nbh books.prd executiv.sum Hyper.Template !:ext /fm/doc/toc/ix # URL: http://fileformats.archiveteam.org/wiki/Maker_Interchange_Format # Reference: https://help.adobe.com/en_US/framemaker/mifreference/mifref.pdf # Update: Joerg Jenderek 2019 Nov 0 string \8 ubyte 0x20 \b, space before version # 3 characters of version number of the MIF language like 1.0, 2.0 ... 2015 ... >9 string x (%.3s # if not greater sign then display 4th character of version >12 ubyte =0x3e \b) >12 ubyte !0x3e \b%c) # comment starting with # shows the name+version number of generating program >13 search/3 # >>&0 string x "%s" # Update: Joerg Jenderek # Note: called "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org 0 search/1 \17 string 3.0 (3.0) # Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fm-hyph-dict-20.trid.xml # Note: called "FrameMaker hyphens dictionary (v2.0)" by TrID >17 string 2.0 (2.0) >17 string 1.0 (1.x) # Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bfont.trid.xml # Update: Joerg Jenderek 2023 # Note: called "XFrameMaker Bitmapped screen Font" by TrID and # "Adobe FrameMaker font" by shared MIME-info database from freedesktop.org 0 string \17 string !1.01 >>17 string x (%-0.4s) >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 \5 string >0 (%-0.4s) # URL: http://fileformats.archiveteam.org/wiki/FrameMaker # Reference: http://mark0.net/download/triddefs_xml.7z # defs/b/book-fm.trid.xml # defs/b/bk-fm.trid.xml # Update: Joerg Jenderek 2023 Dez # Note: called "FrameMaker book (binary)" by TrID and # "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org # look for BookFile, Bookfile (capitalized) or BOOKFILE (upcased) directive 0 string/c \10 string x (%-0.3s # if greater sign then exact 3 byte version string >13 ubyte =0x3e \b) # if digit then 4 byte version string >13 ubyte <0x3A \b%c) # if letter then this is appended sub level after 3 byte version string >13 ubyte >0x3A %c) # first directive typically is followed by one space character >9 ubyte !0x20 \b, no space before version # XXX - this book entry should be verified, if you find one, uncomment this #0 string \6 string 3.0 (3.0) #>6 string 2.0 (2.0) #>6 string 1.0 (1.0) 0 string \