Am 08.09.2011 um 02:24 schrieb Tommaso Cucinotta: > Il 07/09/2011 15:51, Stephan Witt ha scritto: >> Am 07.09.2011 um 15:40 schrieb Tommaso Cucinotta >>> Also, why don't we use the "file" tool, or the libmagic library to detect >>> file formats from the contents ? >> How portable would that be? > > Win: http://gnuwin32.sourceforge.net/packages/file.htm > Mac: you compile GNU stuff on Mac, right ?
No. I'm using mac-ports. I know it is GNU related but it's not really compatible. In the sense of packaging. E. g. I have to compile and build private frameworks for aspell and hunspell to get the spellchecker backends working. When using them from mac-ports I'd pull in the complete mac-ports dependencies and the user would be forced to install mac-ports herself. The libintl e. g. of Mac OS X and of mac-ports are incompatible. But in case these problems doesn't exist: the format and wording of the output of the file command is not reliable either. I don't know what problems we get with the libmagic library... > > Also, I spotted around some "python-magic" module for Python, but I couldn't > understand whether it's easily installable on Win. That sounds much more promising, IMHO. Stephan