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
Magika is available as a command line tool, written in Rust (the `magika` python package ships this client). Here below are a few examples on how to use it, and the output of `magika --help`, which documents the list of options. See [here](./rust/cli/README.md) for developer notes and documentation on how to install the Rust client via `cargo`.
92
-
93
-
Examples:
94
-
95
-
```shell
96
-
$ cd tests_data/basic && magika -r *
97
-
asm/code.asm: Assembly (code)
98
-
batch/simple.bat: DOS batch file (code)
99
-
c/code.c: C source (code)
100
-
css/code.css: CSS source (code)
101
-
csv/magika_test.csv: CSV document (code)
102
-
dockerfile/Dockerfile: Dockerfile (code)
103
-
docx/doc.docx: Microsoft Word 2007+ document (document)
Determines the content type of files with deep-learning
165
-
166
-
Usage: magika [OPTIONS] [PATH]...
167
-
168
-
Arguments:
169
-
[PATH]...
170
-
List of paths to the files to analyze.
171
-
172
-
Use a dash (-) to read from standard input (can only be used once).
173
-
174
-
Options:
175
-
-r, --recursive
176
-
Identifies files within directories instead of identifying the directory itself
177
-
178
-
--no-dereference
179
-
Identifies symbolic links as is instead of identifying their content by following them
180
-
181
-
--colors
182
-
Prints with colors regardless of terminal support
183
-
184
-
--no-colors
185
-
Prints without colors regardless of terminal support
186
-
187
-
-s, --output-score
188
-
Prints the prediction score in addition to the content type
189
-
190
-
-i, --mime-type
191
-
Prints the MIME type instead of the content type description
192
-
193
-
-l, --label
194
-
Prints a simple label instead of the content type description
195
-
196
-
--json
197
-
Prints in JSON format
198
-
199
-
--jsonl
200
-
Prints in JSONL format
201
-
202
-
--format <CUSTOM>
203
-
Prints using a custom format (use --help for details).
204
-
205
-
The following placeholders are supported:
206
-
207
-
%p The file path
208
-
%l The unique label identifying the content type
209
-
%d The description of the content type
210
-
%g The group of the content type
211
-
%m The MIME type of the content type
212
-
%e Possible file extensions for the content type
213
-
%s The score of the content type for the file
214
-
%S The score of the content type for the file in percent
215
-
%b The model output if overruled (empty otherwise)
216
-
%% A literal %
217
-
218
-
-h, --help
219
-
Print help (see a summary with '-h')
220
-
221
-
-V, --version
222
-
Print version
223
-
```
91
+
Magika is available as a command line tool, written in Rust (the `magika` python package ships this client). The output of `magika --help` and the [README](./rust/cli/README.md) document the list of options.
0 commit comments