1 2#------------------------------------------------------------------------------ 3# $File: frame,v 1.19 2024/03/04 00:34:31 christos Exp $ 4# frame: file(1) magic for FrameMaker files 5# 6# This stuff came on a FrameMaker demo tape, most of which is 7# copyright, but this file is "published" as witness the following: 8# 9# URL: https://en.wikipedia.org/wiki/Adobe_FrameMaker 10# 11# Update: Joerg Jenderek 2024 Mar 12# URL: http://fileformats.archiveteam.org/wiki/FrameMaker 13# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fm.trid.xml 14# Note: called "FrameMaker document" by TrID and "Adobe FrameMaker document" by shared MIME-info database 15# 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 16# 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 170 string/b \<MakerFile FrameMaker document 18#!:mime application/octet-stream 19# https://www.iana.org/assignments/media-types/application/vnd.framemaker 20!:mime application/vnd.framemaker 21# version string like 1.0 2.0 3.0 4.0 5.0 5.5 6.0 7.0 8.0 9.0 10.0 22>11 string x (%0.3s 23# before closing directive ">" is appended version letter like: F H J K Q Y 24>>14 ubyte >0x40 %c 25# or last digit of 4 character version string 26>>14 ubyte <0x41 \b%c 27# test again so that next default clause works 28>14 ubyte x 29# Reference: http://mark0.net/download/triddefs_xml.7z/defs/h/hlp-fm.trid.xml 30# Note: called "FrameMaker Help" by TrID 31# look for reference to FrameMaker help name suffix like in: index1.hlp 32>>18 search/9688/s .hlp: \b) help 33# the internal FrameMaker help are just FrameMaker document with hlp suffix; XREF.HLP is same as Xref-hlp.fm 34!:ext hlp 35# For control reason show link name like: 36# "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" 37#>>>&5 string x LINK_NAME "%s" 38>>>&5 string x 39# look for gotolink or openlink keyword before help file name 40>>>&-18 search/18/s link\040 41# link construct with help name like: "gotolink xref.hlp:Overview" "openlink syntax1.hlp:firstpage" 42>>>>&-4 regex/s =^\[A-Za-z0-9.:\040]{1,} with "%s" 43# if not FrameMaker Help assume it is "normal" FrameMaker document 44# shown with closing parenthesis to get look like in frame,v 1.18 45>>18 default x \b) 46# sometimes without suffix like: CHAPTER HARVARD LETTER MEMO1 NEWSLTR REPORT3 47# no samples found with .bk or .book extension 48# allchaps.ix (Framemaker Index) and others like: 49# title.fm4 wp.filt textre1.htr pmscript.ind change.nbh books.prd executiv.sum Hyper.Template 50!:ext /fm/doc/toc/ix 51# URL: http://fileformats.archiveteam.org/wiki/Maker_Interchange_Format 52# Reference: https://help.adobe.com/en_US/framemaker/mifreference/mifref.pdf 53# Update: Joerg Jenderek 2019 Nov 540 string \<MIFFile FrameMaker MIF (ASCII) file 55# https://www.iana.org/assignments/media-types/application/vnd.mif 56!:mime application/vnd.mif 57# mif most but also find bookTOC.framemif 58!:ext mif/framemif 59# followed by space~20h 60#>8 ubyte 0x20 \b, space before version 61# 3 characters of version number of the MIF language like 1.0, 2.0 ... 2015 ... 62>9 string x (%.3s 63# if not greater sign then display 4th character of version 64>12 ubyte =0x3e \b) 65>12 ubyte !0x3e \b%c) 66# comment starting with # shows the name+version number of generating program 67>13 search/3 # 68>>&0 string x "%s" 69# Update: Joerg Jenderek 70# Note: called "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org 710 search/1 \<MakerDictionary FrameMaker Dictionary text 72#!:mime text/plain 73#!:mime application/x-mif 74!:mime application/vnd.framemaker 75# like site.dict but often extension is a 3 letters country code like in: hyphens.brt hyphens.eng 76!:ext dict/eng/brt 77# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fm-hyph-dict-30.trid.xml 78# Note: called "FrameMaker hyphens dictionary (v3.0)" by TrID 79>17 string 3.0 (3.0) 80# Reference: http://mark0.net/download/triddefs_xml.7z/defs/f/fm-hyph-dict-20.trid.xml 81# Note: called "FrameMaker hyphens dictionary (v2.0)" by TrID 82>17 string 2.0 (2.0) 83>17 string 1.0 (1.x) 84# Reference: http://mark0.net/download/triddefs_xml.7z/defs/b/bfont.trid.xml 85# Update: Joerg Jenderek 2023 86# Note: called "XFrameMaker Bitmapped screen Font" by TrID and 87# "Adobe FrameMaker font" by shared MIME-info database from freedesktop.org 880 string \<MakerScreenFont FrameMaker Font file 89#!:mime application/octet-stream 90#!:mime application/x-mif 91!:mime application/x-font-framemaker 92!:ext bfont 93# Note: maybe also other version like: 1.x 94>17 string !1.01 95>>17 string x (%-0.4s) 96>17 string 1.01 (%s) 97# Reference: http://mark0.net/download/triddefs_xml.7z/defs/m/mml-fm.trid.xml 98# Update: Joerg Jenderek 2023 Nov 99# Note: called "FrameMaker Maker Markup Language" by TrID and 100# "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org 1010 string \<MML FrameMaker MML file 102#!:mime text/plain 103#!:mime application/x-mif 104!:mime application/vnd.framemaker 105!:ext mml 106# Note: sometimes followed by space and version like 1.00 (formats.mml sample.mml) and more text 107>5 string >0 (%-0.4s) 108# URL: http://fileformats.archiveteam.org/wiki/FrameMaker 109# Reference: http://mark0.net/download/triddefs_xml.7z 110# defs/b/book-fm.trid.xml 111# defs/b/bk-fm.trid.xml 112# Update: Joerg Jenderek 2023 Dez 113# Note: called "FrameMaker book (binary)" by TrID and 114# "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org 115# look for BookFile, Bookfile (capitalized) or BOOKFILE (upcased) directive 1160 string/c \<Bookfile FrameMaker Book file 117#!:mime application/octet-stream 118#!:mime application/x-mif 119!:mime application/vnd.framemaker 120# http://extension.nirsoft.net/book 121!:ext bk/book 122# version like: 1.0 2.0 3.0 4.0 5.0 5.5 6.0 7.0 8.0 10.0 123# 3 characters of version number string 124>10 string x (%-0.3s 125# if greater sign then exact 3 byte version string 126>13 ubyte =0x3e \b) 127# if digit then 4 byte version string 128>13 ubyte <0x3A \b%c) 129# if letter then this is appended sub level after 3 byte version string 130>13 ubyte >0x3A %c) 131# first directive typically is followed by one space character 132>9 ubyte !0x20 \b, no space before version 133# XXX - this book entry should be verified, if you find one, uncomment this 134#0 string \<Book\040 FrameMaker Book (ASCII) file 135#!:mime application/x-mif 136#>6 string 3.0 (3.0) 137#>6 string 2.0 (2.0) 138#>6 string 1.0 (1.0) 1390 string \<Maker\040Intermediate\040Print\040File FrameMaker IPL file 140!:mime application/x-mif 141