diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a168bcc --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Rust build artifacts +target/ + +# Environment files +.env +.env.* + +# Editor artifacts +*.swp +*.swo +*~ +.idea/ +.vscode/ + +# OS files +.DS_Store +Thumbs.db + +# Database files (local dev) +*.db +*.db-journal diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..cc37904 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,594 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstyle" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" + +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + +[[package]] +name = "anstyle-query" +version = "1.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" +dependencies = [ + "windows-sys", +] + +[[package]] +name = "anstyle-wincon" +version = "3.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" +dependencies = [ + "anstyle", + "once_cell_polyfill", + "windows-sys", +] + +[[package]] +name = "bitflags" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" + +[[package]] +name = "bytes" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" + +[[package]] +name = "cfg-if" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" + +[[package]] +name = "clap" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +dependencies = [ + "clap_builder", + "clap_derive", +] + +[[package]] +name = "clap_builder" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +dependencies = [ + "anstream", + "anstyle", + "clap_lex", + "strsim", +] + +[[package]] +name = "clap_derive" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" + +[[package]] +name = "colorchoice" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" + +[[package]] +name = "errno" +version = "0.3.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + +[[package]] +name = "is_terminal_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" + +[[package]] +name = "itoa" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" + +[[package]] +name = "libc" +version = "0.2.183" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" + +[[package]] +name = "lock_api" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965" +dependencies = [ + "scopeguard", +] + +[[package]] +name = "memchr" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" + +[[package]] +name = "mio" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +dependencies = [ + "libc", + "wasi", + "windows-sys", +] + +[[package]] +name = "once_cell" +version = "1.21.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" + +[[package]] +name = "once_cell_polyfill" +version = "1.70.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" + +[[package]] +name = "parking_lot" +version = "0.12.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-link", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" + +[[package]] +name = "proc-macro2" +version = "1.0.106" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quote" +version = "1.0.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d" +dependencies = [ + "bitflags", +] + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "serde" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +dependencies = [ + "serde_core", + "serde_derive", +] + +[[package]] +name = "serde_core" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.228" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.149" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" +dependencies = [ + "itoa", + "memchr", + "serde", + "serde_core", + "zmij", +] + +[[package]] +name = "shanty-db" +version = "0.1.0" +dependencies = [ + "serde", + "thiserror", +] + +[[package]] +name = "shanty-dl" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "shanty-index" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-notify" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-org" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-play" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-playlist" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-search" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-serve" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "shanty-tag" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-watch" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "shanty-db", + "thiserror", + "tracing", +] + +[[package]] +name = "shanty-web" +version = "0.1.0" +dependencies = [ + "clap", + "serde", + "serde_json", + "shanty-db", + "shanty-dl", + "shanty-index", + "shanty-org", + "shanty-search", + "shanty-tag", + "shanty-watch", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "signal-hook-registry" +version = "1.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b" +dependencies = [ + "errno", + "libc", +] + +[[package]] +name = "smallvec" +version = "1.15.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" + +[[package]] +name = "socket2" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" +dependencies = [ + "libc", + "windows-sys", +] + +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "syn" +version = "2.0.117" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "thiserror" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio" +version = "1.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" +dependencies = [ + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys", +] + +[[package]] +name = "tokio-macros" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" +dependencies = [ + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tracing-core" +version = "0.1.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" +dependencies = [ + "once_cell", +] + +[[package]] +name = "unicode-ident" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" + +[[package]] +name = "utf8parse" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" + +[[package]] +name = "wasi" +version = "0.11.1+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" + +[[package]] +name = "windows-link" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + +[[package]] +name = "zmij" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..3a82440 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,41 @@ +[workspace] +members = [ + "shanty-db", + "shanty-index", + "shanty-tag", + "shanty-org", + "shanty-watch", + "shanty-dl", + "shanty-search", + "shanty-notify", + "shanty-playlist", + "shanty-serve", + "shanty-play", + "shanty-web", +] +resolver = "3" + +[workspace.package] +version = "0.1.0" +edition = "2024" +license = "MIT" +repository = "https://git.squid-inc.dev/connor/shanty" + +[workspace.dependencies] +# Async runtime +tokio = { version = "1", features = ["full"] } + +# Serialization +serde = { version = "1", features = ["derive"] } +serde_json = "1" + +# CLI +clap = { version = "4", features = ["derive"] } + +# Error handling +thiserror = "2" +anyhow = "1" + +# Logging +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..03374d5 --- /dev/null +++ b/readme.md @@ -0,0 +1,41 @@ +# shanty + +A modular music management application for the high seas. Shanty aims to be a better +all-in-one solution for managing, tagging, organizing, and downloading music — built +as a collection of standalone tools that work together seamlessly. + +## Architecture + +Shanty is organized as a Cargo workspace. Each component is its own crate, usable both +as a library and (where applicable) a standalone CLI binary. + +| Crate | Description | +|-------|-------------| +| `shanty-db` | Shared database schema and access layer | +| `shanty-index` | Music file indexing and metadata extraction | +| `shanty-tag` | Metadata tagging via online databases | +| `shanty-org` | File organization and renaming | +| `shanty-watch` | Library watchlist management | +| `shanty-dl` | Music downloading (yt-dlp and more) | +| `shanty-search` | Online music search | +| `shanty-notify` | Notifications for new releases and events | +| `shanty-playlist` | Playlist generation | +| `shanty-serve` | Music serving and streaming | +| `shanty-play` | Built-in playback | +| `shanty-web` | Web interface backend (Actix) with Elm frontend | + +## Building + +```sh +cargo build --workspace +``` + +## Testing + +```sh +cargo test --workspace +``` + +## License + +MIT diff --git a/shanty-db/Cargo.toml b/shanty-db/Cargo.toml new file mode 100644 index 0000000..3485189 --- /dev/null +++ b/shanty-db/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "shanty-db" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Shared database schema and access layer for Shanty" + +[dependencies] +serde = { workspace = true } +thiserror = { workspace = true } diff --git a/shanty-db/src/lib.rs b/shanty-db/src/lib.rs new file mode 100644 index 0000000..94080f7 --- /dev/null +++ b/shanty-db/src/lib.rs @@ -0,0 +1,4 @@ +//! Shared database schema and access layer for Shanty. +//! +//! This crate owns the database schema, migrations, and provides a typed access +//! layer used by all other Shanty crates. diff --git a/shanty-dl/Cargo.toml b/shanty-dl/Cargo.toml new file mode 100644 index 0000000..84df8bd --- /dev/null +++ b/shanty-dl/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shanty-dl" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Music downloading for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +tokio = { workspace = true } diff --git a/shanty-dl/src/lib.rs b/shanty-dl/src/lib.rs new file mode 100644 index 0000000..fb0bd1b --- /dev/null +++ b/shanty-dl/src/lib.rs @@ -0,0 +1,5 @@ +//! Music downloading. +//! +//! Downloads music files using pluggable backends. The default backend uses +//! yt-dlp, with support for additional backends (torrents, Soulseek, etc.) +//! via a trait-based architecture. diff --git a/shanty-dl/src/main.rs b/shanty-dl/src/main.rs new file mode 100644 index 0000000..eb42cb0 --- /dev/null +++ b/shanty-dl/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-dl: music downloading"); +} diff --git a/shanty-index/Cargo.toml b/shanty-index/Cargo.toml new file mode 100644 index 0000000..bdd3dec --- /dev/null +++ b/shanty-index/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-index" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Music file indexing and metadata extraction for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-index/src/lib.rs b/shanty-index/src/lib.rs new file mode 100644 index 0000000..b52051e --- /dev/null +++ b/shanty-index/src/lib.rs @@ -0,0 +1,4 @@ +//! Music file indexing and metadata extraction. +//! +//! Scans a directory tree of music files, extracts embedded metadata (ID3, Vorbis +//! comments, etc.), and stores everything in the Shanty database. diff --git a/shanty-index/src/main.rs b/shanty-index/src/main.rs new file mode 100644 index 0000000..65cc48b --- /dev/null +++ b/shanty-index/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-index: music file indexing and metadata extraction"); +} diff --git a/shanty-notify/Cargo.toml b/shanty-notify/Cargo.toml new file mode 100644 index 0000000..24bebf6 --- /dev/null +++ b/shanty-notify/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-notify" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Notifications for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-notify/src/lib.rs b/shanty-notify/src/lib.rs new file mode 100644 index 0000000..e013fa4 --- /dev/null +++ b/shanty-notify/src/lib.rs @@ -0,0 +1,4 @@ +//! Notifications for new releases and events. +//! +//! Sends notifications to the user via pluggable backends (Apprise, webhooks, +//! etc.) when events occur such as new releases or completed downloads. diff --git a/shanty-notify/src/main.rs b/shanty-notify/src/main.rs new file mode 100644 index 0000000..3134792 --- /dev/null +++ b/shanty-notify/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-notify: notifications"); +} diff --git a/shanty-org/Cargo.toml b/shanty-org/Cargo.toml new file mode 100644 index 0000000..e06c5f9 --- /dev/null +++ b/shanty-org/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-org" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Music file organization and renaming for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-org/src/lib.rs b/shanty-org/src/lib.rs new file mode 100644 index 0000000..716ea0e --- /dev/null +++ b/shanty-org/src/lib.rs @@ -0,0 +1,4 @@ +//! Music file organization and renaming. +//! +//! Organizes music files into a clean directory structure (e.g., +//! Artist/Album/Track) and renames them according to configurable templates. diff --git a/shanty-org/src/main.rs b/shanty-org/src/main.rs new file mode 100644 index 0000000..61aeccc --- /dev/null +++ b/shanty-org/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-org: music file organization and renaming"); +} diff --git a/shanty-play/Cargo.toml b/shanty-play/Cargo.toml new file mode 100644 index 0000000..f986aff --- /dev/null +++ b/shanty-play/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-play" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Built-in music playback for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-play/src/lib.rs b/shanty-play/src/lib.rs new file mode 100644 index 0000000..e914971 --- /dev/null +++ b/shanty-play/src/lib.rs @@ -0,0 +1,4 @@ +//! Built-in music playback. +//! +//! Provides basic audio playback capabilities, including a built-in web player +//! component for the Shanty web interface. diff --git a/shanty-play/src/main.rs b/shanty-play/src/main.rs new file mode 100644 index 0000000..6f85b84 --- /dev/null +++ b/shanty-play/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-play: built-in music playback"); +} diff --git a/shanty-playlist/Cargo.toml b/shanty-playlist/Cargo.toml new file mode 100644 index 0000000..fc77739 --- /dev/null +++ b/shanty-playlist/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-playlist" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Playlist generation for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-playlist/src/lib.rs b/shanty-playlist/src/lib.rs new file mode 100644 index 0000000..1116a2f --- /dev/null +++ b/shanty-playlist/src/lib.rs @@ -0,0 +1,4 @@ +//! Playlist generation. +//! +//! Generates playlists based on the indexed music library using strategies like +//! similar artists, genre matching, smart rules, and weighted random selection. diff --git a/shanty-playlist/src/main.rs b/shanty-playlist/src/main.rs new file mode 100644 index 0000000..ac86400 --- /dev/null +++ b/shanty-playlist/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-playlist: playlist generation"); +} diff --git a/shanty-search/Cargo.toml b/shanty-search/Cargo.toml new file mode 100644 index 0000000..6fcd2fc --- /dev/null +++ b/shanty-search/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-search" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Online music search for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-search/src/lib.rs b/shanty-search/src/lib.rs new file mode 100644 index 0000000..7677c18 --- /dev/null +++ b/shanty-search/src/lib.rs @@ -0,0 +1,4 @@ +//! Online music search. +//! +//! Searches for artists, albums, and tracks via online databases (MusicBrainz, +//! Last.fm, etc.) and returns structured results for adding to the library. diff --git a/shanty-search/src/main.rs b/shanty-search/src/main.rs new file mode 100644 index 0000000..003acec --- /dev/null +++ b/shanty-search/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-search: online music search"); +} diff --git a/shanty-serve/Cargo.toml b/shanty-serve/Cargo.toml new file mode 100644 index 0000000..49d18fe --- /dev/null +++ b/shanty-serve/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "shanty-serve" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Music serving and streaming for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +tokio = { workspace = true } diff --git a/shanty-serve/src/lib.rs b/shanty-serve/src/lib.rs new file mode 100644 index 0000000..bf6abfa --- /dev/null +++ b/shanty-serve/src/lib.rs @@ -0,0 +1,4 @@ +//! Music serving and streaming. +//! +//! Serves music files for playback, with optional Subsonic API compatibility +//! for use with existing Subsonic-compatible clients. diff --git a/shanty-serve/src/main.rs b/shanty-serve/src/main.rs new file mode 100644 index 0000000..5c4e20b --- /dev/null +++ b/shanty-serve/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-serve: music serving and streaming"); +} diff --git a/shanty-tag/Cargo.toml b/shanty-tag/Cargo.toml new file mode 100644 index 0000000..6aeffe1 --- /dev/null +++ b/shanty-tag/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-tag" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Metadata tagging via online databases for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-tag/src/lib.rs b/shanty-tag/src/lib.rs new file mode 100644 index 0000000..0177b14 --- /dev/null +++ b/shanty-tag/src/lib.rs @@ -0,0 +1,5 @@ +//! Metadata tagging via online databases. +//! +//! Fills in missing or incorrect metadata on music files by querying online +//! databases such as MusicBrainz. Supports fuzzy matching and configurable +//! confidence thresholds. diff --git a/shanty-tag/src/main.rs b/shanty-tag/src/main.rs new file mode 100644 index 0000000..639120e --- /dev/null +++ b/shanty-tag/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-tag: metadata tagging via online databases"); +} diff --git a/shanty-watch/Cargo.toml b/shanty-watch/Cargo.toml new file mode 100644 index 0000000..dfd4fc0 --- /dev/null +++ b/shanty-watch/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "shanty-watch" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Library watchlist management for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +clap = { workspace = true } +serde = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } diff --git a/shanty-watch/src/lib.rs b/shanty-watch/src/lib.rs new file mode 100644 index 0000000..caf076c --- /dev/null +++ b/shanty-watch/src/lib.rs @@ -0,0 +1,4 @@ +//! Library watchlist management. +//! +//! Manages the user's music library — tracking which artists, albums, and songs +//! they want, and comparing against what they already have. diff --git a/shanty-watch/src/main.rs b/shanty-watch/src/main.rs new file mode 100644 index 0000000..b457325 --- /dev/null +++ b/shanty-watch/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-watch: library watchlist management"); +} diff --git a/shanty-web/Cargo.toml b/shanty-web/Cargo.toml new file mode 100644 index 0000000..5d41668 --- /dev/null +++ b/shanty-web/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "shanty-web" +version.workspace = true +edition.workspace = true +license.workspace = true +description = "Web interface backend for Shanty" + +[dependencies] +shanty-db = { path = "../shanty-db" } +shanty-index = { path = "../shanty-index" } +shanty-tag = { path = "../shanty-tag" } +shanty-org = { path = "../shanty-org" } +shanty-watch = { path = "../shanty-watch" } +shanty-dl = { path = "../shanty-dl" } +shanty-search = { path = "../shanty-search" } +clap = { workspace = true } +serde = { workspace = true } +serde_json = { workspace = true } +thiserror = { workspace = true } +tracing = { workspace = true } +tokio = { workspace = true } diff --git a/shanty-web/src/lib.rs b/shanty-web/src/lib.rs new file mode 100644 index 0000000..a490e0b --- /dev/null +++ b/shanty-web/src/lib.rs @@ -0,0 +1,5 @@ +//! Web interface backend for Shanty. +//! +//! An Actix-web server that ties all Shanty components together, exposing a REST +//! API consumed by the Elm frontend. Handles background tasks, configuration, +//! and orchestration of indexing, tagging, downloading, and more. diff --git a/shanty-web/src/main.rs b/shanty-web/src/main.rs new file mode 100644 index 0000000..bb9a0d3 --- /dev/null +++ b/shanty-web/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("shanty-web: web interface backend"); +}