[File] [PATCH] of Magdir/riff for CorelSHOW presentation *.SHW

Jörg Jenderek joerg.jen.der.ek at gmx.net
Mon Jan 9 21:17:17 UTC 2023


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
some time ago i send patch for Magdir/ole2compounddocs to recognize
WordPerfect 7-X3 presentation with file suffix SHW. Unfortunately
that extension is also used by Corel software with name CorelSHOW,
which use another file format different from Corel/WordPerfect
Presentation.

When i run file command version 5.44 on such CorelSHOW samples i get
an output like:

lesson.shw:   RIFF (little-endian) data
multi.shw:    RIFF (little-endian) data
qtour.shw:    RIFF (little-endian) data
test-shb.shb: RIFF (little-endian) data
test-shr.shr: RIFF (little-endian) data
40WINNER.SHW: RIFF (little-endian) data
SAMPLE.SHW:   RIFF (little-endian) data

With option -i only generic application/octet-stream is shown.
Furthermore with --extension option only ??? is displayed.

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). All examples are
described with low rate as "Generic RIFF container" by riff.trid.xml.
Some SHW samples (like 40WINNER.SHW multi.shw test.shw) are described
with highest rate as "CorelSHOW presentation (v4)" by
shw-corel.trid.xml. The other SHW samples (like lesson.shw qtour.shw
SAMPLE.SHW) are described with highest rate as "CorelSHOW
presentation (v5)" by shw-corel-5.trid.xml. The test example with SHB
suffix is described with highest rate as "CorelSHOW Background (v5)"
by shb-corel.trid.xml. The test example with SHR suffix is described
with highest rate as "CorelSHOW player data (v5)" by
shr-corel.trid.xml (See appended trid-v-corelshow.txt.gz).

For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). Here
all SHW examples described wrong as "Corel Presentation" with version
"7-8-9" by PUID fmt/877	based on file name extension.

TrID list the used file name extension and often with -v option the
related URL pointing to some information. So i found a page about SHW
(Corel) on file formats archive team website. This is now expressed
by comment lines inside Magdir/riff like:
# URL:		http://fileformats.archiveteam.org/wiki/SHW_(Corel)
# Reference:	http://mark0.net/download/triddefs_xml.7z
#		defs/s/shw-corel.trid.xml
#		defs/s/shw-corel-5.trid.xml
#		defs/s/shb-corel.trid.xml
#		defs/s/shr-corel.trid.xml
There i also found links to download some examples and some file
format informations.

All samples are at least general described inside Magdir/riff by line
 0	string		RIFF		RIFF (little-endian) data
By 4-byte riff type at offset 8 normally the sub classification takes
place. Here this is missing for CorelSHOW samples. According to
documentation CorelSHOW version 4 have RIFF type shw4, CorelSHOW
version 5 have RIFF type shw5, CorelSHOW version 5 player files
(*.SHR) have RIFF type shr5 and CorelSHOW version 5 background files
(.SHB) have RIFF type shl5. There exist entries for other Corel
products inside Magdir/riff. So i add after DESC entry (for Corel
Draw templates variant or Corel Designer illustration) and before
Steinberg CuBase additional lines. These now look like:
 >8	string		shw4	\b, CorelSHOW presentation, version 4
 !:mime	application/x-corel-shw
 !:ext	shw
 >8	string		shw5	\b, CorelSHOW presentation, version 5
 !:mime	application/x-corel-shw
 !:ext	shw
 >8	string		shl5	\b, CorelSHOW Background, version 5
 !:mime	application/x-corel-shb
 !:ext	shb
 >8	string		shr5	\b, CorelSHOW player data, version 5
 !:mime	application/x-corel-shr
 !:ext	shr
Instead of generic mime type application/octet-stream is choose an
user defined one.

After applying the above mentioned modifications by patch
file-5.44-riff-corelshow.diff then all inspected CorelSHOW samples
are still recognized, but described with more details. So now this
looks like:

lesson.shw:   RIFF (little-endian) data
	      , CorelSHOW presentation
	      , version 5
multi.shw:    RIFF (little-endian) data
	      , CorelSHOW presentation
	      , version 4
qtour.shw:    RIFF (little-endian) data
	      , CorelSHOW presentation
	      , version 5
test-shb.shb: RIFF (little-endian) data
	      , CorelSHOW Background
	      , version 5
test-shr.shr: RIFF (little-endian) data
	      , CorelSHOW player data
	      , version 5
40WINNER.SHW: RIFF (little-endian) data
	      , CorelSHOW presentation
	      , version 4
SAMPLE.SHW:   RIFF (little-endian) data
	      , CorelSHOW presentation
	      , version 5

I hope my diff file can be applied in future version of
file utility.

With best wishes
Jörg Jenderek
- --
Jörg Jenderek
-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCY7yEXAAKCRCv8rHJQhrU
1kgTAJ9X6bQrUzC/LtkIjwRWdJY6A/z+lgCfZL17GyJ5LwjpzojCV9X1zPA44ps=
=7Ovl
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-corelshow.txt.gz
Type: application/x-gzip
Size: 716 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230109/1cb8427d/attachment.bin>
-------------- next part --------------
--- file-5.44/magic/Magdir/riff.old	2022-08-16 15:01:06.000000000 +0200
+++ file-5.44/magic/Magdir/riff	2023-01-09 22:07:23.775376200 +0100
@@ -331,8 +331,34 @@
 >>8	string		=DESC
 # MORE TESTS NEEDED HERE!
 #>>>0	use		corel-des
 #>>>0	use		corel-draw
+# From:		Joerg Jenderek
+# URL:		http://fileformats.archiveteam.org/wiki/SHW_(Corel)
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shw-corel.trid.xml
+# Note:		called "CorelSHOW presentation (v4)" by TrID
+>8	string		shw4		\b, CorelSHOW presentation, version 4
+#!:mime	application/octet-stream
+!:mime	application/x-corel-shw
+!:ext	shw
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shw-corel-5.trid.xml
+# Note:		called "CorelSHOW presentation (v5)" by TrID
+>8	string		shw5		\b, CorelSHOW presentation, version 5
+#!:mime	application/octet-stream
+!:mime	application/x-corel-shw
+!:ext	shw
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shb-corel.trid.xml
+# Note:		called "CorelSHOW Background (v5)" by TrID
+>8	string		shl5		\b, CorelSHOW Background, version 5
+#!:mime	application/octet-stream
+!:mime	application/x-corel-shb
+!:ext	shb
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/s/shr-corel.trid.xml
+# Note:		called "CorelSHOW player data (v5)" by TrID
+>8	string		shr5		\b, CorelSHOW player data, version 5
+#!:mime	application/octet-stream
+!:mime	application/x-corel-shr
+!:ext	shr
 >8	string		NUNDROOT	\b, Steinberg CuBase
 # From:		Joerg Jenderek
 # URL:		http://fileformats.archiveteam.org/wiki/MIDI_Instrument_Definition_File
 # Reference:	http://mark0.net/download/triddefs_xml.7z/defs/i/idf.trid.xml
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.44-riff-corelshow.diff.sig
Type: application/octet-stream
Size: 721 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20230109/1cb8427d/attachment.obj>


More information about the File mailing list