<commit_before># glibc-locale-tools

[![Build Status](https://travis-ci.org/Oefenweb/glibc-locale-tools.svg)](https://travis-ci.org/Oefenweb/glibc-locale-tools)

`glibc-locale-tools` provides some tools to work with (glibc) locale files (e.g. `LC_MONETARY`, `LC_NUMERIC`, `LC_TIME`)

## Usage

### locale-extract-category

Extracts a given `LC_*` section (category) from a locale file.

```sh
bin/locale-extract-category < glibc_locale_tools/test/data/nl_NL LC_TIME > glibc_locale_tools/test/data/nl_NL.LC_TIME.actual;
```

### locale-decode-category

Decodes a given `LC_*` (category) file.

```sh
bin/locale-decode-category < glibc_locale_tools/test/data/nl_NL.LC_TIME.expected > glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded;
```

### locale-encode-category

(Re)encodes a given `LC_*` (category) file.

```sh
bin/locale-encode-category < glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded > glibc_locale_tools/test/data/nl_NL.LC_TIME.encoded;
```

## References

* [Glibc locale files](http://localization-guide.readthedocs.org/en/latest/guide/locales/glibc.html)<commit_msg>Improved README<commit_after># glibc-locale-tools

[![Build Status](https://travis-ci.org/Oefenweb/glibc-locale-tools.svg)](https://travis-ci.org/Oefenweb/glibc-locale-tools)

`glibc-locale-tools` provides some tools to work with (glibc) locale files (e.g. `LC_MONETARY`, `LC_NUMERIC`, `LC_TIME`)

## Usage

### locale-extract-category

Extracts a given `LC_*` section (category) from a locale file.

```sh
bin/locale-extract-category < \
  glibc_locale_tools/test/data/nl_NL LC_TIME > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.actual;
```

### locale-decode-category

Decodes a given `LC_*` (category) file.

```sh
bin/locale-decode-category < \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.expected > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded;
```

### locale-encode-category

(Re)encodes a given `LC_*` (category) file.

```sh
bin/locale-encode-category < \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.decoded > \
  glibc_locale_tools/test/data/nl_NL.LC_TIME.encoded;
```

## References

* [Glibc locale files](http://localization-guide.readthedocs.org/en/latest/guide/locales/glibc.html)
{'fraction_non_alphanumeric': 0.15952597994530537, 'fraction_numerical': 0.0, 'mean_word_length': 5.03021978021978, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '6449367', 'n_tokens_mistral': 881, 'n_tokens_neox': 856, 'n_words': 122}