New-add model (add = entering rotation after 4+ weeks out; per channel and any DR channel, 8-week window), site ranks by it; DR rotation-list PDF parser (glyph positions, channel by play profile) and Wayback Machine backfill: 29 weekly lists 2023-2026

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-15 02:50:13 +00:00
co-authored by Claude Opus 5.5
parent 387502ebfa
commit c698925814
9 changed files with 1122 additions and 89 deletions
+13
View File
@@ -4,6 +4,7 @@
//! airplay stats [--db data/airplay.db]
//! airplay check [--db data/airplay.db] gaps, duplicates, DR cross-check, chart completeness
//! airplay model panel | backtest | rank the first models (src/model)
//! airplay rotations [--wayback] [--reparse] parse DR's rotation PDFs (src/rotations.rs)
//! airplay serve [--addr 127.0.0.1:8790] [--prefix /airplay] the playground site (src/web.rs)
//!
//! --backfill fetches all history at once (every DR artist page, the whole Hitlisten archive);
@@ -19,6 +20,7 @@ mod http;
mod model;
mod musicbrainz;
mod playlists;
mod rotations;
mod spotify;
mod web;
@@ -43,6 +45,17 @@ fn main() -> Result<()> {
Some("check") => check::run(&db),
Some("model") => model::run(&db, &args),
Some("serve") => web::serve(&db_path, &args),
Some("pdfdump") => rotations::dump(std::path::Path::new(args.get(2).map(String::as_str).unwrap_or(""))),
Some("rotations") => {
let dir = std::path::Path::new(&db_path).parent().unwrap_or(std::path::Path::new(".")).join("rotations");
if args.iter().any(|a| a == "--wayback") {
let mut log = Vec::new();
let n = rotations::wayback(&db, &http::Http::new(1500)?, &dir, &mut log)?;
println!("wayback: {n} PDFs saved");
for l in log { println!(" {l}"); }
}
rotations::store_all(&db, &dir, args.iter().any(|a| a == "--reparse"))
}
_ => {
eprintln!("usage: airplay collect [--db FILE] [--days 7] [--all-bauer] [--only dr|bauer|hitlisten|deezer|musicbrainz|spotify|playlists|nmf] [--backfill]\n airplay stats [--db FILE]\n airplay check [--db FILE]\n airplay model panel|backtest|rank\n airplay serve [--addr HOST:PORT] [--prefix /airplay]");
std::process::exit(2);