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