You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mime ... the detected MIME types associated with the file,
58
+
like the output of the `file` command
59
+
html ... an interactive HTML-based hex viewer
60
+
json ... a modified version of the SBUD format in JSON syntax
61
+
sbud ... equivalent to 'json'
62
+
63
+
Multiple formats can be output at once:
64
+
65
+
polyfile INPUT_FILE -f mime -f json
66
+
67
+
Their output will be concatenated to STDOUT in the order that
68
+
they occur in the arguments.
69
+
70
+
To save each format to a separate file, see the `--output` argument.
71
+
72
+
If no format is specified, PolyFile defaults to `--format sbud`,
73
+
but this will change to `--format mime` in v0.5.0
74
+
--output OUTPUT, -o OUTPUT
75
+
an optional output path for `--format`
76
+
77
+
Each instance of `--output` applies to the previous instance
78
+
of the `--format` option.
79
+
80
+
For example:
81
+
82
+
polyfile INPUT_FILE --format html --output output.html \
83
+
--format sbud --output output.json
84
+
85
+
will save HTML to to `output.html` and SBUD to `output.json`.
86
+
No two outputs can be directed at the same file path.
87
+
88
+
The path can be '-' for STDOUT.
89
+
If an `--output` is omitted for a format,
90
+
then it will implicitly be printed to STDOUT.
53
91
--filetype FILETYPE, -f FILETYPE
54
-
explicitly match against the given filetype or
55
-
filetype wildcard (default is to match against all
56
-
filetypes)
57
-
--list, -l list the supported filetypes (for the `--filetype`
58
-
argument) and exit
59
-
--html HTML, -t HTML path to write an interactive HTML file for exploring
60
-
the PDF
92
+
explicitly match against the given filetype or filetype wildcard (default is to match against all filetypes)
93
+
--list, -l list the supported filetypes for the `--filetype` argument and exit
94
+
--html HTML, -t HTML path to write an interactive HTML file for exploring the PDF;
95
+
equivalent to `--format html --output HTML`
61
96
--only-match-mime, -I
62
-
just print out the matching MIME types for the file,
63
-
one on each line
64
-
--only-match, -m do not attempt to parse known filetypes; only match
65
-
against file magic
97
+
"just print out the matching MIME types for the file, one on each line;
98
+
equivalent to `--format mime`
99
+
--only-match, -m do not attempt to parse known filetypes; only match against file magic
66
100
--require-match if no matches are found, exit with code 127
67
101
--max-matches MAX_MATCHES
68
102
stop scanning after having found this many matches
103
+
--debugger, -db drop into an interactive debugger for libmagic file definition matching and PolyFile parsing
104
+
--no-debug-python by default, the `--debugger` option will break on custom matchers and prompt to debug using PDB. This option will suppress those prompts.
105
+
--quiet, -q suppress all log output
69
106
--debug, -d print debug information
70
107
--trace, -dd print extra verbose debug information
71
-
--debugger, -db drop into an interactive debugger for libmagic file
72
-
definition matching and PolyFile parsing
73
-
--no-debug-python by default, the `--debugger` option will break on
74
-
custom matchers and prompt to debug using PDB. This
75
-
option will suppress those prompts.
76
-
--quiet, -q suppress all log output (overrides --debug)
77
108
--version, -v print PolyFile's version information to STDERR
78
-
-dumpversion print PolyFile's raw version information to STDOUT and
79
-
exit
109
+
-dumpversion print PolyFile's raw version information to STDOUT and exit
0 commit comments