commit - 9187483a6c2cb57337fc027e6b9d40a38d44ea42
commit + 04a6191cf5be071fe3d5eb27df12bff3ed907a78
blob - fcd535538734c5a806cb19c2024c7bf94f73e820
blob + 00a8c3b0c63eb1018a149fae4b15afd8ee3c2da4
--- Cargo.lock
+++ Cargo.lock
checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
-name = "matchakey"
+name = "matcha"
version = "0.1.3"
dependencies = [
"anyhow",
blob - d3f5b3f04f61bed48cbd5c0ff8fc2f98a6b2a5ce
blob + 9a6b3725e901ccdf74b428c2c963104e7e9fe59e
--- Cargo.toml
+++ Cargo.toml
[package]
-name = "matchakey"
+name = "matcha"
description ="finds audio files with matching key and bpm criteria"
version = "0.1.3"
edition = "2024"
license = "MIT"
-repository = "https://git.sr.ht/~mtmn/matchakey"
+repository = "https://git.sr.ht/~mtmn/matcha"
homepage = "https://mtmn.name"
[dependencies]
blob - 4bc05ef75ece9278c4df119f428a2ec99315728d
blob + 4e69e913bbd0ef6d1ca24d45d4238d549d51ea01
--- README.md
+++ README.md
-# matchakey
+# matcha
A digging companion that finds compatible tracks based on `Key` and `BPM` tags.
## Usage
```sh
-./target/release/matchakey <REFERENCE_TRACK> [OPTIONS] <SOURCE_PATH>...
+./target/release/matcha <REFERENCE_TRACK> [OPTIONS] <SOURCE_PATH>...
```
### Arguments
```sh
# Print all tracks with matching key
-./target/release/matchakey /path/to/my/track.mp3 /path/to/my/music/library
+./target/release/matcha /path/to/my/track.mp3 /path/to/my/music/library
# Print all tracks with matching key and custom drift range
-./target/release/matchakey /path/to/my/track.mp3 --drift 2.0 /path/to/my/music/library
+./target/release/matcha /path/to/my/track.mp3 --drift 2.0 /path/to/my/music/library
# Create an M3U playlist with matched tracks
-./target/release/matchakey /path/to/my/track.mp3 --playlist /path/to/my/music/library
+./target/release/matcha /path/to/my/track.mp3 --playlist /path/to/my/music/library
```
blob - e41f3cc154f73213cb87ec4c963f39e66761f599
blob + a7d0918f75368c6c14e882566638003c4fe4fa5d
--- cliff.toml
+++ cliff.toml
- {% if commit.breaking %}**breaking:** {% endif -%}
{% if commit.scope %}**{{ commit.scope }}:** {% endif -%}
{{ commit.message | upper_first }} \
-([`{{ commit.id | truncate(length=7, end="") }}`](https://git.sr.ht/~mtmn/matchakey/commit/{{ commit.id }}))
+([`{{ commit.id | truncate(length=7, end="") }}`](https://git.sr.ht/~mtmn/matcha/commit/{{ commit.id }}))
{% endfor %}
{% endfor %}
"""
blob - d7678f1b154535c77bba5b0e3b6fbb21c9b6ae30
blob + d98a13c02bbc9b75aec36fca666723c50b72163f
--- flake.nix
+++ flake.nix
];
commonArgs = {
- pname = "matchakey";
+ pname = "matcha";
inherit src;
inherit (cargoToml.package) version;
buildInputs = with pkgs; [sqlite.dev openssl.dev];
};
- matchakey = craneLib.buildPackage (commonArgs
+ matcha = craneLib.buildPackage (commonArgs
// {
cargoArtifacts = craneLib.buildDepsOnly commonArgs;
});
in {
packages = {
- default = matchakey;
- inherit matchakey;
+ default = matcha;
+ inherit matcha;
};
devShells.default = pkgs.mkShell {
blob - fa84f702b130fb635ee9b9213b866dcc4da6447d
blob + 822166b92c3fe6c02afc1cde6291d53c4a067569
--- src/main.rs
+++ src/main.rs
use anyhow::{Context, Result};
use clap::Parser;
use colored::Colorize;
-use matchakey::key;
-use matchakey::track::{TrackInfo, get_track_info};
-use matchakey::utils::is_allowed_extension;
+use matcha::key;
+use matcha::track::{TrackInfo, get_track_info};
+use matcha::utils::is_allowed_extension;
use rayon::prelude::*;
use std::fs::File;
use std::io::Write;
let args = Args::parse();
- info!("Starting matchakey with args: {:?}", args);
+ info!("Starting matcha with args: {:?}", args);
println!(
"{} {}",
let mut results: Vec<(PathBuf, TrackInfo)> = files
.par_iter()
.filter_map(|path| get_track_info(path).ok().map(|info| (path.clone(), info)))
- .filter(|(_, info)| matchakey::drift::should_include_track(info, ref_track, args.drift))
+ .filter(|(_, info)| matcha::drift::should_include_track(info, ref_track, args.drift))
.collect();
results.sort_by(|a, b| {
blob - 986755853ff4f41006bf5f531ca806d6ad255680
blob + 1238877540011b129c494bdaee2fc088ad23b1c9
--- tests/integration_tests.rs
+++ tests/integration_tests.rs
-//! Integration tests for the matchakey application
+//! Integration tests for the matcha application
-use matchakey::key::{Key, Mode};
+use matcha::key::{Key, Mode};
#[test]
fn test_key_parsing_integration() {
blob - 7543fdc3c420cc945f5c416bb3d63700b6a06c48
blob + 630894fd5878b84a8d424103a3a7d88d10d66abd
--- tests/utils_tests.rs
+++ tests/utils_tests.rs
//! Integration tests for utility functions
-use matchakey::utils::is_allowed_extension;
+use matcha::utils::is_allowed_extension;
use std::path::Path;
#[test]