I am trying to create a universal specification in "/etc/magic" for multi-flavoured Prolog, so that I could do mass-transformation of imported predicate libraries for re-targeting to my personal environment for a project.
Having reviewed a number of the "target" files, I believe I would need to search within the first 3K characters of a file for this to be deemed reasonably successful as an approach.
So far I've tried these 2 flavours/definition, with no success:
Code: Select all
0 search/2048 [Pp][Rr][Oo][Ll][Oo][Gg] Prolog Predicate File [ISO-Compliant Prolog], ASCII text
Code: Select all
0 search [Pp][Rr][Oo][Ll][Oo][Gg] Prolog Predicate File [ISO-Compliant Prolog], ASCII text
I have also defined this initial set of other specifications to normalize the files which will be massaged to conform:
Code: Select all
0 string %%Prolog Prolog Predicate File [Non-Specific], ASCII text
0 string %%gprolog Prolog Predicate File [GNU Prolog], ASCII text
0 string %%swipl Prolog Predicate File [SWI-Prolog], ASCII text
0 string %%yap Prolog Predicate File [YAP Prolog], ASCII text
0 string %%eclipse Prolog Predicate File [ECLiPSe], ASCII text
0 string %%bprolog Prolog Predicate File [B-Prolog], ASCII text
0 string %%poplog Prolog Predicate File [Poplog], ASCII text
0 string %%lpaprolog Prolog Predicate File [LPA Prolog], ASCII text
0 string %%isoprolog Prolog Predicate File [ISO-Compliant Prolog], ASCII text
I do NOT want to use the "shebang" (i.e. #!/bin/gprolog) notation for first line auto-detection for execution.
Guidance on search depth specification would be greatly appreciated.