<commit_before>#kmel_db

A parser and generator for Kenwood Music Editor Light databases that works under Linux. The database is used by Kenwood car audio systems to allow searching by album, title, genre and artist. It also allows creation of playlists.

My Kenwood stereo only supports mp3 and wma media formats, so this is currently the default for this application.

You'll need Python version 3 or above, and the [[hsaudiotag3k|https://pypi.python.org/pypi/hsaudiotag3k]] python package installed to run.

## Database format
The kmel_db_format.md document attempts to explain the format of the database. It might be slightly behind the code.

## Generator
To generate a database, just type:

```bash
    ./DapGen.py /path/to/your/usb/drive
```

If you don't specify the path, the generator will process all mounted partitions of type FAT.

Use the '-h' option to see other options.

Current limitations:

* processes mp3 and wma only at this stage (wma not tested)
* include and exclude regular expression parsing for media types not currently implemented
* playlists not currently implemented
* international characters are sorted out of order, so "Bäpa" comes after "By The Hand Of My Father" rather than after "Banks of Newfoundland"

## Parser
To parse a database, just type:<commit_msg>Convert link to md format.<commit_after>#kmel_db

A parser and generator for Kenwood Music Editor Light databases that works under Linux. The database is used by Kenwood car audio systems to allow searching by album, title, genre and artist. It also allows creation of playlists.

My Kenwood stereo only supports mp3 and wma media formats, so this is currently the default for this application.

You'll need Python version 3 or above, and the [hsaudiotag3k](https://pypi.python.org/pypi/hsaudiotag3k) python package installed to run.

## Database format
The kmel_db_format.md document attempts to explain the format of the database. It might be slightly behind the code.

## Generator
To generate a database, just type:

```bash
    ./DapGen.py /path/to/your/usb/drive
```

If you don't specify the path, the generator will process all mounted partitions of type FAT.

Use the '-h' option to see other options.

Current limitations:

* processes mp3 and wma only at this stage (wma not tested)
* include and exclude regular expression parsing for media types not currently implemented
* playlists not currently implemented
* international characters are sorted out of order, so "Bäpa" comes after "By The Hand Of My Father" rather than after "Banks of Newfoundland"

## Parser
To parse a database, just type:
{'fraction_non_alphanumeric': 0.05683563748079877, 'fraction_numerical': 0.0038402457757296467, 'mean_word_length': 4.5190677966101696, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2574162', 'n_tokens_mistral': 703, 'n_tokens_neox': 672, 'n_words': 375}