Metadata-Version: 2.4
Name: mik-automator
Version: 1.1.0
Summary: Windows automator and database tools for Mixed In Key 11
Author-email: bvandrc <bvandercar@outlook.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/bvandrc/mik-automator
Project-URL: Issues, https://github.com/bvandrc/mik-automator/issues
Project-URL: Changelog, https://github.com/bvandrc/mik-automator/blob/main/CHANGELOG.md
Keywords: mixed in key,mixedinkey,mik,dj,key detection,harmonic mixing,automation
Classifier: Environment :: Win32 (MS Windows)
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Multimedia :: Sound/Audio :: Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pywinauto
Requires-Dist: pywin32
Requires-Dist: comtypes
Provides-Extra: dev
Requires-Dist: black; extra == "dev"
Requires-Dist: pylint; extra == "dev"
Requires-Dist: pyright; extra == "dev"
Dynamic: license-file

Windows automator and database tools for Mixed In Key 11.

# Installation

```bash
pip install mik-automator
```

Windows only, Python 3.10+.

If you installed it from GitHub as `mixed-in-key-automator`, uninstall that first (`pip uninstall mixed-in-key-automator`): both install the `mik_automator` package, so keeping both leaves them overwriting each other's files.

# Usage

## `mik_automator`

Opens Mixed In Key (or connects to it if it's already open), adds a folder, waits for the analysis to finish, then closes it.

```python
from mik_automator import mik_automator

mik_automator.run(r"C:\Users\me\Music\DJ Tracks")
```

It knows the analysis is done once Mixed In Key's database stops changing and the window closes without asking to confirm.

## `mik_db`

Reads and edits Mixed In Key's database (`MIKStore.db`) directly.

- `rename_file(src, dest, names=None)`: points a song at its renamed file, so it keeps its analysis.
- `remove_files(filepaths)` and `remove_missing_files()`: remove songs, so they're analyzed again when added, or because their file is gone.
- `get_song_files()` and `get_files_missing_from_db(dir)`: read-only, safe while Mixed In Key is running.

Run `python -m mik_automator.mik_db` to remove the songs whose files no longer exist.

# Development

```bash
python -m venv .venv
source .venv/Scripts/activate
pip install -e ".[dev]"
```

Lint with `pylint $(git ls-files '*.py')` and `pyright`, and format with `black .`. CI runs all three on pull requests.

# License

[MIT](LICENSE)
