<commit_before>Python modules
=========================

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/adc4c799f1d545cdb8e568057fa59524)](https://app.codacy.com/app/adobe-type-tools/python-modules?utm_source=github.com&utm_medium=referral&utm_content=adobe-type-tools/python-modules&utm_campaign=Badge_Grade_Dashboard)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/0c4dd87e3a6a45d6bc8d034d8c84cbf7)](https://app.codacy.com/app/frankrolf/python-modules?utm_source=github.com&utm_medium=referral&utm_content=adobe-type-tools/python-modules&utm_campaign=badger)

These files are used and required by some of the Python scripts available in the other repositories.

For FontLab scripts, put these files in `[...]/FontLab/Studio 5/Macros/System/Modules`.  
For the remaining scripts, put these files in the same folder as the script, or put them in one of the folders listed by `sys.path`.

## kern feature writer modules
### `WriteFeaturesKernFDK.py`

Example code for using `WriteFeaturesKernFDK` as a module in RoboFont:

```python

    import os
    import WriteFeaturesKernFDK

    f = CurrentFont()

    minKern = 5
    writeTrimmed = False
    writeSubtables = False

    instanceFolder = os.path.dirname(f.path)

    WriteFeaturesKernFDK.KernDataClass(f, instanceFolder, minKern, writeTrimmed, writeSubtables)

```
<commit_msg>Remove old Codacy badge<commit_after>Python modules
=========================

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/adc4c799f1d545cdb8e568057fa59524)](https://app.codacy.com/app/adobe-type-tools/python-modules?utm_source=github.com&utm_medium=referral&utm_content=adobe-type-tools/python-modules&utm_campaign=Badge_Grade_Dashboard)

These files are used and required by some of the Python scripts available in the other repositories.

For FontLab scripts, put these files in `[...]/FontLab/Studio 5/Macros/System/Modules`.  
For the remaining scripts, put these files in the same folder as the script, or put them in one of the folders listed by `sys.path`.

## kern feature writer modules
### `WriteFeaturesKernFDK.py`

Example code for using `WriteFeaturesKernFDK` as a module in RoboFont:

```python

    import os
    import WriteFeaturesKernFDK

    f = CurrentFont()

    minKern = 5
    writeTrimmed = False
    writeSubtables = False

    instanceFolder = os.path.dirname(f.path)

    WriteFeaturesKernFDK.KernDataClass(f, instanceFolder, minKern, writeTrimmed, writeSubtables)

```

{'fraction_non_alphanumeric': 0.11893203883495146, 'fraction_numerical': 0.024676375404530743, 'mean_word_length': 5.2292191435768265, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6996830', 'n_tokens_mistral': 882, 'n_tokens_neox': 807, 'n_words': 185}