Feature request #4407
Provide an entry for the magic(5) file
|Pull Request or Patch supplied:||No||Resolution:|
The magic file, usually /etc/magic for local entries on a debian-based system, is the file used to tell what kind of data is contained in a file by taking a look inside.
This is what makes this kind of responses possible from the file(1) command:
$ file snow.swf asus.swf
snow.swf: Macromedia Flash data, version 5
asus.swf: Macromedia Flash data (compressed), version 8
Note the level of detail. The command distinguished between a version 5 and a version 8, and also between an uncompressed and a compressed kind of the SWF binary format.
With text format it should be much easier, but this is what you get querying a qgis project file:
$ file myproject.qgs
myproject.qgs: exported SGML document text
Not that helpful ...
Adding the following line to /etc/magic makes it a_little_bit better:
0 search/1000/cb \\<!DOCTYPE\\ qgis QuantumGIS configuration file
But I'd love to see something more detailed.
In any case it doesn't look like there's one of those standardized ways to install such entries (ala /etc/magic.d/*) so not sure how would such entries addition be automatized on "make install".
Still, providing a file for manual installation might be handy for the time being and inspirational for whoever wants to improve it for final submission to whatever package mantains the magic file.
For the record, the official maintainer for that file is the libmagic1 package maintainer.