A Wrapped / Replay like for teal.fm and rocksky.app (currently on hiatus)
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

config

Mia 610f9993 ee9cbd23

+143 -1
+116
Cargo.lock
··· 77 77 ] 78 78 79 79 [[package]] 80 + name = "anstream" 81 + version = "0.6.21" 82 + source = "registry+https://github.com/rust-lang/crates.io-index" 83 + checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" 84 + dependencies = [ 85 + "anstyle", 86 + "anstyle-parse", 87 + "anstyle-query", 88 + "anstyle-wincon", 89 + "colorchoice", 90 + "is_terminal_polyfill", 91 + "utf8parse", 92 + ] 93 + 94 + [[package]] 95 + name = "anstyle" 96 + version = "1.0.13" 97 + source = "registry+https://github.com/rust-lang/crates.io-index" 98 + checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" 99 + 100 + [[package]] 101 + name = "anstyle-parse" 102 + version = "0.2.7" 103 + source = "registry+https://github.com/rust-lang/crates.io-index" 104 + checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 105 + dependencies = [ 106 + "utf8parse", 107 + ] 108 + 109 + [[package]] 110 + name = "anstyle-query" 111 + version = "1.1.4" 112 + source = "registry+https://github.com/rust-lang/crates.io-index" 113 + checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" 114 + dependencies = [ 115 + "windows-sys 0.60.2", 116 + ] 117 + 118 + [[package]] 119 + name = "anstyle-wincon" 120 + version = "3.0.10" 121 + source = "registry+https://github.com/rust-lang/crates.io-index" 122 + checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" 123 + dependencies = [ 124 + "anstyle", 125 + "once_cell_polyfill", 126 + "windows-sys 0.60.2", 127 + ] 128 + 129 + [[package]] 80 130 name = "arrayvec" 81 131 version = "0.7.6" 82 132 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 648 698 ] 649 699 650 700 [[package]] 701 + name = "clap" 702 + version = "4.5.51" 703 + source = "registry+https://github.com/rust-lang/crates.io-index" 704 + checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" 705 + dependencies = [ 706 + "clap_builder", 707 + "clap_derive", 708 + ] 709 + 710 + [[package]] 711 + name = "clap_builder" 712 + version = "4.5.51" 713 + source = "registry+https://github.com/rust-lang/crates.io-index" 714 + checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" 715 + dependencies = [ 716 + "anstream", 717 + "anstyle", 718 + "clap_lex", 719 + "strsim", 720 + ] 721 + 722 + [[package]] 723 + name = "clap_derive" 724 + version = "4.5.49" 725 + source = "registry+https://github.com/rust-lang/crates.io-index" 726 + checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" 727 + dependencies = [ 728 + "heck 0.5.0", 729 + "proc-macro2", 730 + "quote", 731 + "syn 2.0.108", 732 + ] 733 + 734 + [[package]] 735 + name = "clap_lex" 736 + version = "0.7.6" 737 + source = "registry+https://github.com/rust-lang/crates.io-index" 738 + checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" 739 + 740 + [[package]] 741 + name = "colorchoice" 742 + version = "1.0.4" 743 + source = "registry+https://github.com/rust-lang/crates.io-index" 744 + checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 745 + 746 + [[package]] 651 747 name = "comfy-table" 652 748 version = "7.1.2" 653 749 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1093 1189 dependencies = [ 1094 1190 "axum", 1095 1191 "chrono", 1192 + "clap", 1096 1193 "duckdb", 1097 1194 "eyre", 1098 1195 "jacquard", 1099 1196 "jacquard-api", 1197 + "r2d2", 1100 1198 "tokio", 1101 1199 "tower-http", 1102 1200 "tracing", ··· 1759 1857 ] 1760 1858 1761 1859 [[package]] 1860 + name = "is_terminal_polyfill" 1861 + version = "1.70.2" 1862 + source = "registry+https://github.com/rust-lang/crates.io-index" 1863 + checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" 1864 + 1865 + [[package]] 1762 1866 name = "itoa" 1763 1867 version = "1.0.15" 1764 1868 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2462 2566 version = "1.21.3" 2463 2567 source = "registry+https://github.com/rust-lang/crates.io-index" 2464 2568 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 2569 + 2570 + [[package]] 2571 + name = "once_cell_polyfill" 2572 + version = "1.70.2" 2573 + source = "registry+https://github.com/rust-lang/crates.io-index" 2574 + checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" 2465 2575 2466 2576 [[package]] 2467 2577 name = "ouroboros" ··· 4164 4274 version = "1.0.4" 4165 4275 source = "registry+https://github.com/rust-lang/crates.io-index" 4166 4276 checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 4277 + 4278 + [[package]] 4279 + name = "utf8parse" 4280 + version = "0.2.2" 4281 + source = "registry+https://github.com/rust-lang/crates.io-index" 4282 + checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 4167 4283 4168 4284 [[package]] 4169 4285 name = "uuid"
+2
Cargo.toml
··· 6 6 [dependencies] 7 7 axum = { version = "0.8", features = ["json"] } 8 8 chrono = { version = "0.4", features = ["serde"] } 9 + clap = { version = "4.5", features = ["derive", "env"] } 9 10 duckdb = { version = "1.4", features = ["bundled", "chrono", "r2d2", "uuid"] } 10 11 eyre = "0.6" 11 12 jacquard = { version = "0.9", default-features = false , features = ["api_bluesky", "derive", "dns"] } 12 13 jacquard-api = { version = "0.9", features = ["fm_teal", "app_rocksky"] } 14 + r2d2 = "0.8" 13 15 tokio = { version = "1.42", features = ["full"] } 14 16 tower-http = { version = "0.6", features = ["cors", "trace"] } 15 17 tracing = "0.1"
+17
src/config.rs
··· 1 + use clap::Parser; 2 + 3 + #[derive(Debug, Parser)] 4 + pub struct Config { 5 + /// URI of the Postgres instance containing musicbrainz data 6 + #[clap(env)] 7 + pub mb_pg_uri: String, 8 + /// Location for the Flashback database 9 + #[clap(env, default_value = "/data/flashback.db")] 10 + pub db: String, 11 + /// Jetstream URL to use for record ingest. 12 + #[clap(env, default_value = "wss://jetstream1.us-east.bsky.network")] 13 + pub jetstream: String, 14 + /// Port for the Flashback server 15 + #[clap(env, default_value_t = 8080)] 16 + pub port: u16, 17 + }
+8 -1
src/main.rs
··· 1 + use clap::Parser; 2 + 3 + mod config; 4 + // mod ingest; 5 + 1 6 #[tokio::main] 2 7 async fn main() -> eyre::Result<()> { 3 8 tracing_subscriber::fmt::init(); 4 9 5 - println!("Hello, world!"); 10 + let config = config::Config::parse(); 11 + 12 + let ddb = duckdb::DuckdbConnectionManager::file(config.db)?; 6 13 7 14 Ok(()) 8 15 }