Debian Codegraph @

utils/lexers_matcher/README.md

raw
1 # Minted lexer matcher
2
3 Purpose of this tool is to make matchin between `minted` availabl lexers and syntax schemas provided by `syntax-highlighter`.
4
5 ### Usage
6
7 Call script with xml files as arguments. The `latex.xml` in the input will be ignored.
8
9 ```bash
10 match_languages.py ../../data/syntax/*.xml
11 ```
12
13 The script will generate an output file `lexers_found.xml` which should be manually merged into `../../data/syntax/latex.xml`, e.g.
14
15 ```bash
16 meld lexers_found.xml ../../data/syntax/latex.xml
17 ```
18
19 Additional options to the script:
20
21 * `-v` - more verbose output
22 * `-o file_name` - output file name
23
24 ### Configuration
25
26 `config.yml` provides extra configuration for the tool.
27
28 * `fuzz_level` - used for fuzzy matching, not used anymore
29 * `minted_blacklisted` - list of languages in minted, which should be ignored (e.g. due to duplication or latex incompatible names, like 'c++' and 'cpp' in minted, only 'cpp' will work with `mycode`
30 * `minted_mapping` - list of `key: val` pairs, where `key` is minted name of language, anbd `val` is corresponfing lexer in this repository, for all pairs which do not have exact matching
31 * `lstlisting_mapping` - same as for minted but for lstlistings, currenlty not supported yet.
32
33 Whenever `minted` language name is references in fact it refeers to `pygments` which provides syntax highlighting for `minted`.
34
35 ## LICENSE
36
37 The script is distributed under MIT license.