diff --git a/.gitignore b/.gitignore index d556b87..ca16980 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ index.html blog-tmp.html public/index.html public/rss.xml +mdf-blog diff --git a/Cargo.lock b/Cargo.lock index c93d59c..6a24b60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "aho-corasick" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" -dependencies = [ - "memchr", -] - [[package]] name = "android_system_properties" version = "0.1.5" @@ -33,105 +24,18 @@ dependencies = [ "quick-xml", ] -[[package]] -name = "atomic-waker" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" -[[package]] -name = "axum" -version = "0.8.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" -dependencies = [ - "axum-core", - "bytes", - "form_urlencoded", - "futures-util", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-util", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde_core", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "axum-core" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "http-body-util", - "mime", - "pin-project-lite", - "sync_wrapper", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "base64" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" - -[[package]] -name = "bitflags" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" - [[package]] name = "bumpalo" version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" -[[package]] -name = "bytes" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" - [[package]] name = "cc" version = "1.2.56" @@ -251,29 +155,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[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 = "find-msvc-tools" version = "0.1.9" @@ -286,147 +167,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "form_urlencoded" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" - -[[package]] -name = "futures-task" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" - -[[package]] -name = "futures-util" -version = "0.3.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" -dependencies = [ - "futures-core", - "futures-task", - "pin-project-lite", - "slab", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "http" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" -dependencies = [ - "bytes", - "itoa", -] - -[[package]] -name = "http-body" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "http-body-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" -dependencies = [ - "bytes", - "futures-core", - "http", - "http-body", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", -] - -[[package]] -name = "hyper" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab2d4f250c3d7b1c9fcdff1cece94ea4e2dfbec68614f7b87cb205f24ca9d11" -dependencies = [ - "atomic-waker", - "bytes", - "futures-channel", - "futures-core", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "pin-utils", - "smallvec", - "tokio", -] - -[[package]] -name = "hyper-util" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" -dependencies = [ - "bytes", - "http", - "http-body", - "hyper", - "pin-project-lite", - "tokio", - "tower-service", -] - [[package]] name = "iana-time-zone" version = "0.1.65" @@ -457,12 +197,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "itoa" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" - [[package]] name = "js-sys" version = "0.3.91" @@ -479,15 +213,6 @@ 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 = "log" version = "0.4.29" @@ -503,12 +228,6 @@ dependencies = [ "unicode-id", ] -[[package]] -name = "matchit" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" - [[package]] name = "mdf-blog" version = "0.1.0" @@ -518,40 +237,12 @@ dependencies = [ "rss", ] -[[package]] -name = "mdf-bouncer" -version = "0.1.0" -dependencies = [ - "axum", - "log", - "pretty_env_logger", - "tokio", - "tower-http", -] - [[package]] name = "memchr" version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "mio" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" -dependencies = [ - "libc", - "wasi", - "windows-sys", -] - [[package]] name = "never" version = "0.1.0" @@ -573,57 +264,6 @@ version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" -[[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 = "percent-encoding" -version = "2.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" - -[[package]] -name = "pin-project-lite" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pretty_env_logger" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "926d36b9553851b8b0005f1275891b392ee4d2d833852c417ed025477350fb9d" -dependencies = [ - "env_logger", - "log", -] - [[package]] name = "proc-macro2" version = "1.0.106" @@ -633,12 +273,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quick-xml" version = "0.37.5" @@ -658,44 +292,6 @@ 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 = "regex" -version = "1.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" - [[package]] name = "rss" version = "2.0.12" @@ -714,121 +310,12 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" -[[package]] -name = "ryu" -version = "1.0.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" - -[[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", -] - -[[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 = "serde_path_to_error" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" -dependencies = [ - "itoa", - "serde", - "serde_core", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[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 = "slab" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" - -[[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" @@ -846,113 +333,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "sync_wrapper" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[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 = "tower" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" -dependencies = [ - "futures-core", - "futures-util", - "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4e6559d53cc268e5031cd8429d05415bc4cb4aefc4aa5d6cc35fbf5b924a1f8" -dependencies = [ - "base64", - "bitflags", - "bytes", - "http", - "mime", - "pin-project-lite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" -dependencies = [ - "log", - "pin-project-lite", - "tracing-core", -] - -[[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-id" version = "0.3.6" @@ -965,12 +345,6 @@ version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" -[[package]] -name = "wasi" -version = "0.11.1+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" - [[package]] name = "wasm-bindgen" version = "0.2.114" @@ -1016,37 +390,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.62.2" @@ -1105,18 +448,3 @@ checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ "windows-link", ] - -[[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 index a1fab28..1b786b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,7 +7,3 @@ edition = "2024" markdown = "*" rss = "*" chrono = {version = "*", features = ["now"]} - -[workspace] -resolver = "3" -members = ["mdf-bouncer"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..bf446d5 --- /dev/null +++ b/README.md @@ -0,0 +1,7 @@ +- If using a precompiled version of mdf-blog, place the `mdf-blog` executable + in this directory (project root). +- Use `./new.sh` to create new blogpost in ./blogs. This will open your + editor defined by the EDITOR environment variable. +- Use `./run.sh` to generate all output files in "./public" +- Use `USERNAME="your username" PASSWORD="your password" ./push.sh` to + push to server. diff --git a/blogs/day6.md b/blogs/day6.md index f574318..9baac1f 100644 --- a/blogs/day6.md +++ b/blogs/day6.md @@ -3,6 +3,7 @@ author: Rakarake pubDate: Fri, Mar 27 2026 --- Warframe. +Erm, yeah. ![a spinning golden banana](./golden-banana.gif "Oh Banana") diff --git a/blogs/day7.md b/blogs/day7.md index 2814f1a..218064e 100644 --- a/blogs/day7.md +++ b/blogs/day7.md @@ -1,5 +1,6 @@ -title: A statement +title: Infrastructure complete author: Rakarake -pubDate: Fri, Mar 27 2026 +pubDate: Sat, Mar 28 2026 --- -Kyuuuuuuu! 🐳 +It's been done 🐍🥰💕. + diff --git a/blogs/day8.md b/blogs/day8.md new file mode 100644 index 0000000..fcd57bf --- /dev/null +++ b/blogs/day8.md @@ -0,0 +1,5 @@ +title: We love slop +author: Rakarake +pubDate: Sat, Mar 28 2026 +--- +🐖🐖 diff --git a/blogs/day9.md b/blogs/day9.md new file mode 100644 index 0000000..d8f8bff --- /dev/null +++ b/blogs/day9.md @@ -0,0 +1,9 @@ +title: NEW MDF MEMBER IN AGES +author: Rakarake +pubDate: Wed, Apr 1 2026 +--- +Welcome Loriik! + +Huge moment for the MDF, the interview process was long and tedious. +Hundreds of candidates. Many work hours. (real). + diff --git a/flake.lock b/flake.lock index 6f8bad3..e3816b4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -66,28 +50,11 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1771043024, - "narHash": "sha256-O1XDr7EWbRp+kHrNNgLWgIrB0/US5wvw9K6RERWAj6I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3aadb7ca9eac2891d52a9dec199d9580a6e2bf44", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay", - "zig-overlay": "zig-overlay" + "rust-overlay": "rust-overlay" } }, "rust-overlay": { @@ -122,42 +89,6 @@ "repo": "default", "type": "github" } - }, - "systems_2": { - "flake": false, - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "zig-overlay": { - "inputs": { - "flake-compat": "flake-compat", - "nixpkgs": "nixpkgs_3", - "systems": "systems_2" - }, - "locked": { - "lastModified": 1772540502, - "narHash": "sha256-HXlx2i9gGH2HKfBSMihKCvU6DQMVlR4iyOulkSOe+Cg=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "03fa375def0685b8ce282f118452532845f16a20", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4b0b867..84f3dd5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,14 +1,13 @@ { - description = "Rust flake"; + description = "mdf-blog"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # or whatever vers flake-utils.url = "github:numtide/flake-utils"; rust-overlay.url = "github:oxalica/rust-overlay"; - zig-overlay.url = "github:mitchellh/zig-overlay"; }; - outputs = { self, nixpkgs, flake-utils, rust-overlay, zig-overlay, ... }: + outputs = { nixpkgs, flake-utils, rust-overlay, ... }: flake-utils.lib.eachDefaultSystem (system: let overlays = [ (import rust-overlay) ]; @@ -17,33 +16,20 @@ }; in { - devShell = pkgs.mkShell rec { - LD_LIBRARY_PATH = "${pkgs.lib.makeLibraryPath buildInputs}"; + defaultPackage = pkgs.rustPlatform.buildRustPackage { + name = "mdf-blog"; + pname = "mdf-blog"; + src = ./.; + cargoLock = { + lockFile = ./Cargo.lock; + }; + }; + devShell = pkgs.mkShell { packages = with pkgs; [ rustc cargo rust-analyzer - gcc - zig-overlay.packages."x86_64-linux".master - ]; - buildInputs = with pkgs; [ - libdisplay-info - libgbm - #mesa - libinput - pixman - seatd - udev - libxkbcommon - wayland - wayland.dev - wayland-protocols - libGL - vulkan-headers vulkan-loader - vulkan-tools vulkan-tools-lunarg - vulkan-extension-layer - vulkan-validation-layers # don't need them *strictly* but immensely helpful - #libglvnd + curl ]; }; } diff --git a/mdf-bouncer/Cargo.toml b/mdf-bouncer/Cargo.toml deleted file mode 100644 index 5a14993..0000000 --- a/mdf-bouncer/Cargo.toml +++ /dev/null @@ -1,11 +0,0 @@ -[package] -name = "mdf-bouncer" -version = "0.1.0" -edition = "2024" - -[dependencies] -axum = "*" -tokio = { version = "*", features = ["full"] } -log = "0.4" -pretty_env_logger = "0.4" -tower-http = { version = "*", features = ["auth"] } diff --git a/mdf-bouncer/src/main.rs b/mdf-bouncer/src/main.rs deleted file mode 100644 index edc1b7c..0000000 --- a/mdf-bouncer/src/main.rs +++ /dev/null @@ -1,83 +0,0 @@ -use std::{env::{args, var}, io, sync::Arc}; - -use axum::{Router, body::{Body, Bytes}, extract::{DefaultBodyLimit, Path, State}, http::StatusCode, routing::{delete, post, put}}; -use log::info; -use tokio::fs; -use std::path::PathBuf; - -#[derive(Clone)] -struct AppState { - root: PathBuf, -} - -#[tokio::main] -async fn main() -> io::Result<()> { - pretty_env_logger::init(); - // get secret from secret file - let mut args = args().skip(1); - let target_path = args.next().expect("need to specify target path"); - let secret_path = args.next().expect("need to specify path to secret file"); - let secret = std::fs::read_to_string(secret_path)?; - - let port = if let Ok(port_str) = var("MDFBOUNCER_PORT") { - port_str.parse::().expect("PORT is malformed") - } else { 3236 }; - - let maximum_packet_size: usize = if let Ok(port_str) = var("MDFBOUNCER_MAXIMUM_PACKET_SIZE") { - port_str.parse::().expect("MDFBOUNCER_MAXIMUM_PACKET_SIZE is malformed") - } else { (2 << 20) * 10 }; - - let state = Arc::new(AppState { root: PathBuf::from(target_path) }); - - let app = Router::new() - .route("/{*key}", put(put_file)) - .route("/{*key}", delete(delete_file)) - .with_state(state) - .layer(DefaultBodyLimit::max(maximum_packet_size)); - - let listener = tokio::net::TcpListener::bind(("localhost", port)) - .await - .expect("failed to bind to tcp socket"); - axum::serve(listener, app).await.unwrap(); - - Ok(()) -} - -async fn delete_file(State(state): State>, Path(path): Path) -> Result { - let full_path = safe_join(&state.root, &path)?; - info!("about to delete: {:?}", full_path); - - fs::remove_file(full_path) - .await - .map_err(|_| StatusCode::NOT_FOUND)?; - - Ok(StatusCode::NO_CONTENT) -} - -async fn put_file(State(state): State>, Path(path): Path, body: Bytes) -> Result { - let full_path = safe_join(&state.root, &path)?; - info!("about to put: {:?}", full_path); - - if let Some(parent) = full_path.parent() { - fs::create_dir_all(parent).await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; - } - fs::write(full_path, body) - .await - .map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)?; - - Ok(StatusCode::CREATED) -} - -/// Make supplied path does not contain anything other than relative -/// paths. -fn safe_join(base: &PathBuf, user_path: &str) -> Result { - let mut full = base.clone(); - let path = PathBuf::from(user_path); - for comp in path.components() { - match comp { - std::path::Component::Normal(p) => full.push(p), - _ => return Err(StatusCode::BAD_REQUEST), - } - } - Ok(full) -} diff --git a/new.sh b/new.sh new file mode 100755 index 0000000..94810cd --- /dev/null +++ b/new.sh @@ -0,0 +1,8 @@ +#!/bin/sh +git pull + +printf "name of file (e.g. day67.md): " +read filename +cargo run -- new > blogs/$filename +$EDITOR blogs/$filename + diff --git a/push.sh b/push.sh new file mode 100755 index 0000000..8bddad4 --- /dev/null +++ b/push.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +git add blogs +git commit -m "blog update" +git push + +for file in $(find public -type f) +do + echo "uploading: $file" + curl -u "$USER:$PASSWORD" https://mdf.farm/api/${file#*/} --upload-file $file +done + diff --git a/run.sh b/run.sh index 7f08741..a5d9d19 100755 --- a/run.sh +++ b/run.sh @@ -1,8 +1,12 @@ #/bin/sh -cargo run -- html blogs/* > blog-tmp.html +cargo build && cp target/debug/mdf-blog . || true + +BLOGS=$(ls $PWD/blogs/*) + +./mdf-blog html $BLOGS > blog-tmp.html sed template.html -e '/INSERT_HERE/{ r blog-tmp.html d }' > public/index.html -cargo run -- rss blogs/* > public/rss.xml +./mdf-blog rss $BLOGS > public/rss.xml diff --git a/src/main.rs b/src/main.rs index 3106f3b..00dc41e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,11 @@ use std::{collections::HashMap, io, path::Path}; use markdown::to_html; -use rss::{Channel, GuidBuilder, ItemBuilder}; +use rss::{Channel, ChannelBuilder, GuidBuilder, Item, ItemBuilder}; -fn main() -> io::Result<()> { +fn main() -> Result<(), String> { let posts = std::env::args().skip(2).map(|f| { - let contents = std::fs::read_to_string(f.clone())?; + let contents = std::fs::read_to_string(f.clone()).map_err(|e| format!("when reading file {f} got {e}"))?; + // parse metadata, then the rest to html let mut metadata: HashMap = contents.lines().take_while(|l| { // header ends here @@ -26,35 +27,36 @@ fn main() -> io::Result<()> { }).concat(); Ok((to_html(&body), metadata)) - }).collect::)>, io::Error>>()?; + }).collect::)>, String>>()?; if let Some(mode) = std::env::args().skip(1).next() { match mode.as_str() { "rss" => { - let mut channel = Channel::default(); - channel.title = "MDF blog huge".to_string(); - channel.link = "https://mdf.farm".to_string(); - channel.description = "The MDF blog".to_string(); - channel.generator = Some("Rakabaka's tooling".to_string()); - channel.items = posts.iter().map(|(body, metadata)| { - let guid = metadata.get("guid").map(|guid| - GuidBuilder::default() - .value(guid) - .permalink(false) - .build() - ); - ItemBuilder::default() - .title(metadata.get("title").map(|title| title.clone())) - .description(Some(body.clone())) - .pub_date(metadata.get("pubDate").map(|title| title.clone())) - .link(metadata.get("guid").map(|g| format!("https://mdf.farm/#{g}"))) - .guid(guid) - .build() - }).collect(); + let channel = ChannelBuilder::default() + .title("MDF blog huge".to_string()) + .link("https://mdf.farm".to_string()) + .description("The MDF blog".to_string()) + .generator(Some("Rakabaka's tooling".to_string())) + .items(posts.iter().map(|(body, metadata)| { + let guid = metadata.get("guid").map(|guid| + GuidBuilder::default() + .value(guid) + .permalink(false) + .build() + ); + ItemBuilder::default() + .title(metadata.get("title").map(|title| title.clone())) + .description(Some(body.clone())) + .pub_date(metadata.get("pubDate").map(|title| title.clone())) + .link(metadata.get("guid").map(|g| format!("https://mdf.farm/#{g}"))) + .guid(guid) + .build() + }).collect::>()) + .build(); print!("{}", channel); }, "html" => { - print!("{}", posts.iter().enumerate().map(|(i, (body, metadata))| { + print!("{}", posts.iter().rev().enumerate().map(|(i, (body, metadata))| { let guid = metadata.get("guid").unwrap_or(&i.to_string()).clone(); let title = metadata.get("title").map(|title| format!("

{title}

")).unwrap_or("".to_string()); let pub_date = metadata.get("pubDate").map(|pub_date| format!("{pub_date}")).unwrap_or("".to_string()); @@ -77,9 +79,7 @@ fn main() -> io::Result<()> { print!("title: {title}author: {author}pubDate: {pub_date}\n---\n"); }, _ => eprintln!("need to specify 'rss', 'html' or 'new'"), - } - } else { - eprintln!("need to specify 'rss', 'html' or 'new'"); + } } Ok(()) } diff --git a/upload.sh b/upload.sh deleted file mode 100755 index 730c2c4..0000000 --- a/upload.sh +++ /dev/null @@ -1 +0,0 @@ -rsync -rvz -e 'ssh -p 8022' --progress public/* rakarake@chat.mdf.farm:/data/website