problem set generator
1
fork

Configure Feed

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

initial commit, everything in a WIP state

sevenpigeons 0f50d4b9

+1342
+2
.gitignore
··· 1 + /target 2 + /fonts/*
+1209
Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "adler2" 7 + version = "2.0.1" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 10 + 11 + [[package]] 12 + name = "android_system_properties" 13 + version = "0.1.5" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 16 + dependencies = [ 17 + "libc", 18 + ] 19 + 20 + [[package]] 21 + name = "approx" 22 + version = "0.3.2" 23 + source = "registry+https://github.com/rust-lang/crates.io-index" 24 + checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" 25 + dependencies = [ 26 + "num-traits", 27 + ] 28 + 29 + [[package]] 30 + name = "atomic-waker" 31 + version = "1.1.2" 32 + source = "registry+https://github.com/rust-lang/crates.io-index" 33 + checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 34 + 35 + [[package]] 36 + name = "autocfg" 37 + version = "1.5.0" 38 + source = "registry+https://github.com/rust-lang/crates.io-index" 39 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 40 + 41 + [[package]] 42 + name = "axum" 43 + version = "0.8.9" 44 + source = "registry+https://github.com/rust-lang/crates.io-index" 45 + checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" 46 + dependencies = [ 47 + "axum-core", 48 + "bytes", 49 + "form_urlencoded", 50 + "futures-util", 51 + "http", 52 + "http-body", 53 + "http-body-util", 54 + "hyper", 55 + "hyper-util", 56 + "itoa 1.0.18", 57 + "matchit", 58 + "memchr", 59 + "mime", 60 + "percent-encoding", 61 + "pin-project-lite", 62 + "serde_core", 63 + "serde_json", 64 + "serde_path_to_error", 65 + "serde_urlencoded", 66 + "sync_wrapper", 67 + "tokio", 68 + "tower", 69 + "tower-layer", 70 + "tower-service", 71 + "tracing", 72 + ] 73 + 74 + [[package]] 75 + name = "axum-core" 76 + version = "0.5.6" 77 + source = "registry+https://github.com/rust-lang/crates.io-index" 78 + checksum = "08c78f31d7b1291f7ee735c1c6780ccde7785daae9a9206026862dab7d8792d1" 79 + dependencies = [ 80 + "bytes", 81 + "futures-core", 82 + "http", 83 + "http-body", 84 + "http-body-util", 85 + "mime", 86 + "pin-project-lite", 87 + "sync_wrapper", 88 + "tower-layer", 89 + "tower-service", 90 + "tracing", 91 + ] 92 + 93 + [[package]] 94 + name = "base-x" 95 + version = "0.2.11" 96 + source = "registry+https://github.com/rust-lang/crates.io-index" 97 + checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 98 + 99 + [[package]] 100 + name = "bincode" 101 + version = "1.3.3" 102 + source = "registry+https://github.com/rust-lang/crates.io-index" 103 + checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 104 + dependencies = [ 105 + "serde", 106 + ] 107 + 108 + [[package]] 109 + name = "bstr" 110 + version = "1.12.1" 111 + source = "registry+https://github.com/rust-lang/crates.io-index" 112 + checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" 113 + dependencies = [ 114 + "memchr", 115 + "regex-automata", 116 + "serde", 117 + ] 118 + 119 + [[package]] 120 + name = "bumpalo" 121 + version = "3.20.2" 122 + source = "registry+https://github.com/rust-lang/crates.io-index" 123 + checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" 124 + 125 + [[package]] 126 + name = "byteorder" 127 + version = "1.5.0" 128 + source = "registry+https://github.com/rust-lang/crates.io-index" 129 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 130 + 131 + [[package]] 132 + name = "bytes" 133 + version = "1.11.1" 134 + source = "registry+https://github.com/rust-lang/crates.io-index" 135 + checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" 136 + 137 + [[package]] 138 + name = "cc" 139 + version = "1.2.60" 140 + source = "registry+https://github.com/rust-lang/crates.io-index" 141 + checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" 142 + dependencies = [ 143 + "find-msvc-tools", 144 + "shlex", 145 + ] 146 + 147 + [[package]] 148 + name = "cfg-if" 149 + version = "1.0.4" 150 + source = "registry+https://github.com/rust-lang/crates.io-index" 151 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 152 + 153 + [[package]] 154 + name = "chrono" 155 + version = "0.4.44" 156 + source = "registry+https://github.com/rust-lang/crates.io-index" 157 + checksum = "c673075a2e0e5f4a1dde27ce9dee1ea4558c7ffe648f576438a20ca1d2acc4b0" 158 + dependencies = [ 159 + "iana-time-zone", 160 + "js-sys", 161 + "num-traits", 162 + "wasm-bindgen", 163 + "windows-link", 164 + ] 165 + 166 + [[package]] 167 + name = "const_fn" 168 + version = "0.4.12" 169 + source = "registry+https://github.com/rust-lang/crates.io-index" 170 + checksum = "413d67b29ef1021b4d60f4aa1e925ca031751e213832b4b1d588fae623c05c60" 171 + 172 + [[package]] 173 + name = "core-foundation-sys" 174 + version = "0.8.7" 175 + source = "registry+https://github.com/rust-lang/crates.io-index" 176 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 177 + 178 + [[package]] 179 + name = "crc32fast" 180 + version = "1.5.0" 181 + source = "registry+https://github.com/rust-lang/crates.io-index" 182 + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 183 + dependencies = [ 184 + "cfg-if", 185 + ] 186 + 187 + [[package]] 188 + name = "derive_more" 189 + version = "0.99.20" 190 + source = "registry+https://github.com/rust-lang/crates.io-index" 191 + checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" 192 + dependencies = [ 193 + "proc-macro2", 194 + "quote", 195 + "syn 2.0.117", 196 + ] 197 + 198 + [[package]] 199 + name = "discard" 200 + version = "1.0.4" 201 + source = "registry+https://github.com/rust-lang/crates.io-index" 202 + checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 203 + 204 + [[package]] 205 + name = "dtoa" 206 + version = "0.4.8" 207 + source = "registry+https://github.com/rust-lang/crates.io-index" 208 + checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" 209 + 210 + [[package]] 211 + name = "encoding" 212 + version = "0.2.33" 213 + source = "registry+https://github.com/rust-lang/crates.io-index" 214 + checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 215 + dependencies = [ 216 + "encoding-index-japanese", 217 + "encoding-index-korean", 218 + "encoding-index-simpchinese", 219 + "encoding-index-singlebyte", 220 + "encoding-index-tradchinese", 221 + ] 222 + 223 + [[package]] 224 + name = "encoding-index-japanese" 225 + version = "1.20141219.5" 226 + source = "registry+https://github.com/rust-lang/crates.io-index" 227 + checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 228 + dependencies = [ 229 + "encoding_index_tests", 230 + ] 231 + 232 + [[package]] 233 + name = "encoding-index-korean" 234 + version = "1.20141219.5" 235 + source = "registry+https://github.com/rust-lang/crates.io-index" 236 + checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 237 + dependencies = [ 238 + "encoding_index_tests", 239 + ] 240 + 241 + [[package]] 242 + name = "encoding-index-simpchinese" 243 + version = "1.20141219.5" 244 + source = "registry+https://github.com/rust-lang/crates.io-index" 245 + checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 246 + dependencies = [ 247 + "encoding_index_tests", 248 + ] 249 + 250 + [[package]] 251 + name = "encoding-index-singlebyte" 252 + version = "1.20141219.5" 253 + source = "registry+https://github.com/rust-lang/crates.io-index" 254 + checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 255 + dependencies = [ 256 + "encoding_index_tests", 257 + ] 258 + 259 + [[package]] 260 + name = "encoding-index-tradchinese" 261 + version = "1.20141219.5" 262 + source = "registry+https://github.com/rust-lang/crates.io-index" 263 + checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 264 + dependencies = [ 265 + "encoding_index_tests", 266 + ] 267 + 268 + [[package]] 269 + name = "encoding_index_tests" 270 + version = "0.1.4" 271 + source = "registry+https://github.com/rust-lang/crates.io-index" 272 + checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 273 + 274 + [[package]] 275 + name = "find-msvc-tools" 276 + version = "0.1.9" 277 + source = "registry+https://github.com/rust-lang/crates.io-index" 278 + checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" 279 + 280 + [[package]] 281 + name = "flate2" 282 + version = "1.1.9" 283 + source = "registry+https://github.com/rust-lang/crates.io-index" 284 + checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" 285 + dependencies = [ 286 + "crc32fast", 287 + "miniz_oxide", 288 + ] 289 + 290 + [[package]] 291 + name = "form_urlencoded" 292 + version = "1.2.2" 293 + source = "registry+https://github.com/rust-lang/crates.io-index" 294 + checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf" 295 + dependencies = [ 296 + "percent-encoding", 297 + ] 298 + 299 + [[package]] 300 + name = "fst" 301 + version = "0.4.7" 302 + source = "registry+https://github.com/rust-lang/crates.io-index" 303 + checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a" 304 + 305 + [[package]] 306 + name = "futures-channel" 307 + version = "0.3.32" 308 + source = "registry+https://github.com/rust-lang/crates.io-index" 309 + checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" 310 + dependencies = [ 311 + "futures-core", 312 + ] 313 + 314 + [[package]] 315 + name = "futures-core" 316 + version = "0.3.32" 317 + source = "registry+https://github.com/rust-lang/crates.io-index" 318 + checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" 319 + 320 + [[package]] 321 + name = "futures-task" 322 + version = "0.3.32" 323 + source = "registry+https://github.com/rust-lang/crates.io-index" 324 + checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" 325 + 326 + [[package]] 327 + name = "futures-util" 328 + version = "0.3.32" 329 + source = "registry+https://github.com/rust-lang/crates.io-index" 330 + checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" 331 + dependencies = [ 332 + "futures-core", 333 + "futures-task", 334 + "pin-project-lite", 335 + "slab", 336 + ] 337 + 338 + [[package]] 339 + name = "genpdf" 340 + version = "0.2.0" 341 + source = "registry+https://github.com/rust-lang/crates.io-index" 342 + checksum = "a1c422344482708cb32db843cf3f55f27918cd24fec7b505bde895a1e8702c34" 343 + dependencies = [ 344 + "derive_more", 345 + "hyphenation", 346 + "lopdf", 347 + "printpdf", 348 + "rusttype", 349 + ] 350 + 351 + [[package]] 352 + name = "http" 353 + version = "1.4.0" 354 + source = "registry+https://github.com/rust-lang/crates.io-index" 355 + checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" 356 + dependencies = [ 357 + "bytes", 358 + "itoa 1.0.18", 359 + ] 360 + 361 + [[package]] 362 + name = "http-body" 363 + version = "1.0.1" 364 + source = "registry+https://github.com/rust-lang/crates.io-index" 365 + checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 366 + dependencies = [ 367 + "bytes", 368 + "http", 369 + ] 370 + 371 + [[package]] 372 + name = "http-body-util" 373 + version = "0.1.3" 374 + source = "registry+https://github.com/rust-lang/crates.io-index" 375 + checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 376 + dependencies = [ 377 + "bytes", 378 + "futures-core", 379 + "http", 380 + "http-body", 381 + "pin-project-lite", 382 + ] 383 + 384 + [[package]] 385 + name = "httparse" 386 + version = "1.10.1" 387 + source = "registry+https://github.com/rust-lang/crates.io-index" 388 + checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 389 + 390 + [[package]] 391 + name = "httpdate" 392 + version = "1.0.3" 393 + source = "registry+https://github.com/rust-lang/crates.io-index" 394 + checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 395 + 396 + [[package]] 397 + name = "hyper" 398 + version = "1.9.0" 399 + source = "registry+https://github.com/rust-lang/crates.io-index" 400 + checksum = "6299f016b246a94207e63da54dbe807655bf9e00044f73ded42c3ac5305fbcca" 401 + dependencies = [ 402 + "atomic-waker", 403 + "bytes", 404 + "futures-channel", 405 + "futures-core", 406 + "http", 407 + "http-body", 408 + "httparse", 409 + "httpdate", 410 + "itoa 1.0.18", 411 + "pin-project-lite", 412 + "smallvec", 413 + "tokio", 414 + ] 415 + 416 + [[package]] 417 + name = "hyper-util" 418 + version = "0.1.20" 419 + source = "registry+https://github.com/rust-lang/crates.io-index" 420 + checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" 421 + dependencies = [ 422 + "bytes", 423 + "http", 424 + "http-body", 425 + "hyper", 426 + "pin-project-lite", 427 + "tokio", 428 + "tower-service", 429 + ] 430 + 431 + [[package]] 432 + name = "hyphenation" 433 + version = "0.8.4" 434 + source = "registry+https://github.com/rust-lang/crates.io-index" 435 + checksum = "bcf4dd4c44ae85155502a52c48739c8a48185d1449fff1963cffee63c28a50f0" 436 + dependencies = [ 437 + "bincode", 438 + "fst", 439 + "hyphenation_commons", 440 + "pocket-resources", 441 + "serde", 442 + ] 443 + 444 + [[package]] 445 + name = "hyphenation_commons" 446 + version = "0.8.4" 447 + source = "registry+https://github.com/rust-lang/crates.io-index" 448 + checksum = "5febe7a2ade5c7d98eb8b75f946c046b335324b06a14ea0998271504134c05bf" 449 + dependencies = [ 450 + "fst", 451 + "serde", 452 + ] 453 + 454 + [[package]] 455 + name = "iana-time-zone" 456 + version = "0.1.65" 457 + source = "registry+https://github.com/rust-lang/crates.io-index" 458 + checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470" 459 + dependencies = [ 460 + "android_system_properties", 461 + "core-foundation-sys", 462 + "iana-time-zone-haiku", 463 + "js-sys", 464 + "log", 465 + "wasm-bindgen", 466 + "windows-core", 467 + ] 468 + 469 + [[package]] 470 + name = "iana-time-zone-haiku" 471 + version = "0.1.2" 472 + source = "registry+https://github.com/rust-lang/crates.io-index" 473 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 474 + dependencies = [ 475 + "cc", 476 + ] 477 + 478 + [[package]] 479 + name = "itoa" 480 + version = "0.4.8" 481 + source = "registry+https://github.com/rust-lang/crates.io-index" 482 + checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 483 + 484 + [[package]] 485 + name = "itoa" 486 + version = "1.0.18" 487 + source = "registry+https://github.com/rust-lang/crates.io-index" 488 + checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" 489 + 490 + [[package]] 491 + name = "js-sys" 492 + version = "0.3.95" 493 + source = "registry+https://github.com/rust-lang/crates.io-index" 494 + checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" 495 + dependencies = [ 496 + "once_cell", 497 + "wasm-bindgen", 498 + ] 499 + 500 + [[package]] 501 + name = "libc" 502 + version = "0.2.185" 503 + source = "registry+https://github.com/rust-lang/crates.io-index" 504 + checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" 505 + 506 + [[package]] 507 + name = "linked-hash-map" 508 + version = "0.5.6" 509 + source = "registry+https://github.com/rust-lang/crates.io-index" 510 + checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 511 + 512 + [[package]] 513 + name = "log" 514 + version = "0.4.29" 515 + source = "registry+https://github.com/rust-lang/crates.io-index" 516 + checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 517 + 518 + [[package]] 519 + name = "lopdf" 520 + version = "0.26.0" 521 + source = "registry+https://github.com/rust-lang/crates.io-index" 522 + checksum = "b49a0272112719d0037ab63d4bb67f73ba659e1e90bc38f235f163a457ac16f3" 523 + dependencies = [ 524 + "chrono", 525 + "dtoa", 526 + "encoding", 527 + "flate2", 528 + "itoa 0.4.8", 529 + "linked-hash-map", 530 + "log", 531 + "lzw", 532 + "pom", 533 + "time", 534 + ] 535 + 536 + [[package]] 537 + name = "lzw" 538 + version = "0.10.0" 539 + source = "registry+https://github.com/rust-lang/crates.io-index" 540 + checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 541 + 542 + [[package]] 543 + name = "matchit" 544 + version = "0.8.4" 545 + source = "registry+https://github.com/rust-lang/crates.io-index" 546 + checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" 547 + 548 + [[package]] 549 + name = "memchr" 550 + version = "2.8.0" 551 + source = "registry+https://github.com/rust-lang/crates.io-index" 552 + checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" 553 + 554 + [[package]] 555 + name = "mime" 556 + version = "0.3.17" 557 + source = "registry+https://github.com/rust-lang/crates.io-index" 558 + checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 559 + 560 + [[package]] 561 + name = "miniz_oxide" 562 + version = "0.8.9" 563 + source = "registry+https://github.com/rust-lang/crates.io-index" 564 + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 565 + dependencies = [ 566 + "adler2", 567 + "simd-adler32", 568 + ] 569 + 570 + [[package]] 571 + name = "mio" 572 + version = "1.2.0" 573 + source = "registry+https://github.com/rust-lang/crates.io-index" 574 + checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" 575 + dependencies = [ 576 + "libc", 577 + "wasi", 578 + "windows-sys", 579 + ] 580 + 581 + [[package]] 582 + name = "num-traits" 583 + version = "0.2.19" 584 + source = "registry+https://github.com/rust-lang/crates.io-index" 585 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 586 + dependencies = [ 587 + "autocfg", 588 + ] 589 + 590 + [[package]] 591 + name = "once_cell" 592 + version = "1.21.4" 593 + source = "registry+https://github.com/rust-lang/crates.io-index" 594 + checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" 595 + 596 + [[package]] 597 + name = "ordered-float" 598 + version = "1.1.1" 599 + source = "registry+https://github.com/rust-lang/crates.io-index" 600 + checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" 601 + dependencies = [ 602 + "num-traits", 603 + ] 604 + 605 + [[package]] 606 + name = "percent-encoding" 607 + version = "2.3.2" 608 + source = "registry+https://github.com/rust-lang/crates.io-index" 609 + checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 610 + 611 + [[package]] 612 + name = "pin-project-lite" 613 + version = "0.2.17" 614 + source = "registry+https://github.com/rust-lang/crates.io-index" 615 + checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" 616 + 617 + [[package]] 618 + name = "pocket-resources" 619 + version = "0.3.2" 620 + source = "registry+https://github.com/rust-lang/crates.io-index" 621 + checksum = "c135f38778ad324d9e9ee68690bac2c1a51f340fdf96ca13e2ab3914eb2e51d8" 622 + 623 + [[package]] 624 + name = "pom" 625 + version = "3.4.0" 626 + source = "registry+https://github.com/rust-lang/crates.io-index" 627 + checksum = "6c972d8f86e943ad532d0b04e8965a749ad1d18bb981a9c7b3ae72fe7fd7744b" 628 + dependencies = [ 629 + "bstr", 630 + ] 631 + 632 + [[package]] 633 + name = "printpdf" 634 + version = "0.3.4" 635 + source = "registry+https://github.com/rust-lang/crates.io-index" 636 + checksum = "1a2472a184bcb128d0e3db65b59ebd11d010259a5e14fd9d048cba8f2c9302d4" 637 + dependencies = [ 638 + "js-sys", 639 + "lopdf", 640 + "rusttype", 641 + "time", 642 + ] 643 + 644 + [[package]] 645 + name = "problem_generator" 646 + version = "0.1.0" 647 + dependencies = [ 648 + "axum", 649 + "genpdf", 650 + "hyphenation", 651 + "tokio", 652 + ] 653 + 654 + [[package]] 655 + name = "proc-macro-hack" 656 + version = "0.5.20+deprecated" 657 + source = "registry+https://github.com/rust-lang/crates.io-index" 658 + checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 659 + 660 + [[package]] 661 + name = "proc-macro2" 662 + version = "1.0.106" 663 + source = "registry+https://github.com/rust-lang/crates.io-index" 664 + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" 665 + dependencies = [ 666 + "unicode-ident", 667 + ] 668 + 669 + [[package]] 670 + name = "quote" 671 + version = "1.0.45" 672 + source = "registry+https://github.com/rust-lang/crates.io-index" 673 + checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" 674 + dependencies = [ 675 + "proc-macro2", 676 + ] 677 + 678 + [[package]] 679 + name = "regex-automata" 680 + version = "0.4.14" 681 + source = "registry+https://github.com/rust-lang/crates.io-index" 682 + checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" 683 + 684 + [[package]] 685 + name = "rustc_version" 686 + version = "0.2.3" 687 + source = "registry+https://github.com/rust-lang/crates.io-index" 688 + checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 689 + dependencies = [ 690 + "semver", 691 + ] 692 + 693 + [[package]] 694 + name = "rusttype" 695 + version = "0.8.3" 696 + source = "registry+https://github.com/rust-lang/crates.io-index" 697 + checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" 698 + dependencies = [ 699 + "approx", 700 + "ordered-float", 701 + "stb_truetype", 702 + ] 703 + 704 + [[package]] 705 + name = "rustversion" 706 + version = "1.0.22" 707 + source = "registry+https://github.com/rust-lang/crates.io-index" 708 + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 709 + 710 + [[package]] 711 + name = "ryu" 712 + version = "1.0.23" 713 + source = "registry+https://github.com/rust-lang/crates.io-index" 714 + checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" 715 + 716 + [[package]] 717 + name = "semver" 718 + version = "0.9.0" 719 + source = "registry+https://github.com/rust-lang/crates.io-index" 720 + checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 721 + dependencies = [ 722 + "semver-parser", 723 + ] 724 + 725 + [[package]] 726 + name = "semver-parser" 727 + version = "0.7.0" 728 + source = "registry+https://github.com/rust-lang/crates.io-index" 729 + checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 730 + 731 + [[package]] 732 + name = "serde" 733 + version = "1.0.228" 734 + source = "registry+https://github.com/rust-lang/crates.io-index" 735 + checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 736 + dependencies = [ 737 + "serde_core", 738 + "serde_derive", 739 + ] 740 + 741 + [[package]] 742 + name = "serde_core" 743 + version = "1.0.228" 744 + source = "registry+https://github.com/rust-lang/crates.io-index" 745 + checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" 746 + dependencies = [ 747 + "serde_derive", 748 + ] 749 + 750 + [[package]] 751 + name = "serde_derive" 752 + version = "1.0.228" 753 + source = "registry+https://github.com/rust-lang/crates.io-index" 754 + checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" 755 + dependencies = [ 756 + "proc-macro2", 757 + "quote", 758 + "syn 2.0.117", 759 + ] 760 + 761 + [[package]] 762 + name = "serde_json" 763 + version = "1.0.149" 764 + source = "registry+https://github.com/rust-lang/crates.io-index" 765 + checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86" 766 + dependencies = [ 767 + "itoa 1.0.18", 768 + "memchr", 769 + "serde", 770 + "serde_core", 771 + "zmij", 772 + ] 773 + 774 + [[package]] 775 + name = "serde_path_to_error" 776 + version = "0.1.20" 777 + source = "registry+https://github.com/rust-lang/crates.io-index" 778 + checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" 779 + dependencies = [ 780 + "itoa 1.0.18", 781 + "serde", 782 + "serde_core", 783 + ] 784 + 785 + [[package]] 786 + name = "serde_urlencoded" 787 + version = "0.7.1" 788 + source = "registry+https://github.com/rust-lang/crates.io-index" 789 + checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 790 + dependencies = [ 791 + "form_urlencoded", 792 + "itoa 1.0.18", 793 + "ryu", 794 + "serde", 795 + ] 796 + 797 + [[package]] 798 + name = "sha1" 799 + version = "0.6.1" 800 + source = "registry+https://github.com/rust-lang/crates.io-index" 801 + checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 802 + dependencies = [ 803 + "sha1_smol", 804 + ] 805 + 806 + [[package]] 807 + name = "sha1_smol" 808 + version = "1.0.1" 809 + source = "registry+https://github.com/rust-lang/crates.io-index" 810 + checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 811 + 812 + [[package]] 813 + name = "shlex" 814 + version = "1.3.0" 815 + source = "registry+https://github.com/rust-lang/crates.io-index" 816 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 817 + 818 + [[package]] 819 + name = "simd-adler32" 820 + version = "0.3.9" 821 + source = "registry+https://github.com/rust-lang/crates.io-index" 822 + checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" 823 + 824 + [[package]] 825 + name = "slab" 826 + version = "0.4.12" 827 + source = "registry+https://github.com/rust-lang/crates.io-index" 828 + checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" 829 + 830 + [[package]] 831 + name = "smallvec" 832 + version = "1.15.1" 833 + source = "registry+https://github.com/rust-lang/crates.io-index" 834 + checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" 835 + 836 + [[package]] 837 + name = "socket2" 838 + version = "0.6.3" 839 + source = "registry+https://github.com/rust-lang/crates.io-index" 840 + checksum = "3a766e1110788c36f4fa1c2b71b387a7815aa65f88ce0229841826633d93723e" 841 + dependencies = [ 842 + "libc", 843 + "windows-sys", 844 + ] 845 + 846 + [[package]] 847 + name = "standback" 848 + version = "0.2.17" 849 + source = "registry+https://github.com/rust-lang/crates.io-index" 850 + checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 851 + dependencies = [ 852 + "version_check", 853 + ] 854 + 855 + [[package]] 856 + name = "stb_truetype" 857 + version = "0.3.1" 858 + source = "registry+https://github.com/rust-lang/crates.io-index" 859 + checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" 860 + dependencies = [ 861 + "byteorder", 862 + ] 863 + 864 + [[package]] 865 + name = "stdweb" 866 + version = "0.4.20" 867 + source = "registry+https://github.com/rust-lang/crates.io-index" 868 + checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 869 + dependencies = [ 870 + "discard", 871 + "rustc_version", 872 + "stdweb-derive", 873 + "stdweb-internal-macros", 874 + "stdweb-internal-runtime", 875 + "wasm-bindgen", 876 + ] 877 + 878 + [[package]] 879 + name = "stdweb-derive" 880 + version = "0.5.3" 881 + source = "registry+https://github.com/rust-lang/crates.io-index" 882 + checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 883 + dependencies = [ 884 + "proc-macro2", 885 + "quote", 886 + "serde", 887 + "serde_derive", 888 + "syn 1.0.109", 889 + ] 890 + 891 + [[package]] 892 + name = "stdweb-internal-macros" 893 + version = "0.2.9" 894 + source = "registry+https://github.com/rust-lang/crates.io-index" 895 + checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 896 + dependencies = [ 897 + "base-x", 898 + "proc-macro2", 899 + "quote", 900 + "serde", 901 + "serde_derive", 902 + "serde_json", 903 + "sha1", 904 + "syn 1.0.109", 905 + ] 906 + 907 + [[package]] 908 + name = "stdweb-internal-runtime" 909 + version = "0.1.5" 910 + source = "registry+https://github.com/rust-lang/crates.io-index" 911 + checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 912 + 913 + [[package]] 914 + name = "syn" 915 + version = "1.0.109" 916 + source = "registry+https://github.com/rust-lang/crates.io-index" 917 + checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 918 + dependencies = [ 919 + "proc-macro2", 920 + "quote", 921 + "unicode-ident", 922 + ] 923 + 924 + [[package]] 925 + name = "syn" 926 + version = "2.0.117" 927 + source = "registry+https://github.com/rust-lang/crates.io-index" 928 + checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" 929 + dependencies = [ 930 + "proc-macro2", 931 + "quote", 932 + "unicode-ident", 933 + ] 934 + 935 + [[package]] 936 + name = "sync_wrapper" 937 + version = "1.0.2" 938 + source = "registry+https://github.com/rust-lang/crates.io-index" 939 + checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 940 + 941 + [[package]] 942 + name = "time" 943 + version = "0.2.27" 944 + source = "registry+https://github.com/rust-lang/crates.io-index" 945 + checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 946 + dependencies = [ 947 + "const_fn", 948 + "libc", 949 + "standback", 950 + "stdweb", 951 + "time-macros", 952 + "version_check", 953 + "winapi", 954 + ] 955 + 956 + [[package]] 957 + name = "time-macros" 958 + version = "0.1.1" 959 + source = "registry+https://github.com/rust-lang/crates.io-index" 960 + checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 961 + dependencies = [ 962 + "proc-macro-hack", 963 + "time-macros-impl", 964 + ] 965 + 966 + [[package]] 967 + name = "time-macros-impl" 968 + version = "0.1.2" 969 + source = "registry+https://github.com/rust-lang/crates.io-index" 970 + checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 971 + dependencies = [ 972 + "proc-macro-hack", 973 + "proc-macro2", 974 + "quote", 975 + "standback", 976 + "syn 1.0.109", 977 + ] 978 + 979 + [[package]] 980 + name = "tokio" 981 + version = "1.52.1" 982 + source = "registry+https://github.com/rust-lang/crates.io-index" 983 + checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" 984 + dependencies = [ 985 + "libc", 986 + "mio", 987 + "pin-project-lite", 988 + "socket2", 989 + "tokio-macros", 990 + "windows-sys", 991 + ] 992 + 993 + [[package]] 994 + name = "tokio-macros" 995 + version = "2.7.0" 996 + source = "registry+https://github.com/rust-lang/crates.io-index" 997 + checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" 998 + dependencies = [ 999 + "proc-macro2", 1000 + "quote", 1001 + "syn 2.0.117", 1002 + ] 1003 + 1004 + [[package]] 1005 + name = "tower" 1006 + version = "0.5.3" 1007 + source = "registry+https://github.com/rust-lang/crates.io-index" 1008 + checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4" 1009 + dependencies = [ 1010 + "futures-core", 1011 + "futures-util", 1012 + "pin-project-lite", 1013 + "sync_wrapper", 1014 + "tokio", 1015 + "tower-layer", 1016 + "tower-service", 1017 + "tracing", 1018 + ] 1019 + 1020 + [[package]] 1021 + name = "tower-layer" 1022 + version = "0.3.3" 1023 + source = "registry+https://github.com/rust-lang/crates.io-index" 1024 + checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 1025 + 1026 + [[package]] 1027 + name = "tower-service" 1028 + version = "0.3.3" 1029 + source = "registry+https://github.com/rust-lang/crates.io-index" 1030 + checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 1031 + 1032 + [[package]] 1033 + name = "tracing" 1034 + version = "0.1.44" 1035 + source = "registry+https://github.com/rust-lang/crates.io-index" 1036 + checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" 1037 + dependencies = [ 1038 + "log", 1039 + "pin-project-lite", 1040 + "tracing-core", 1041 + ] 1042 + 1043 + [[package]] 1044 + name = "tracing-core" 1045 + version = "0.1.36" 1046 + source = "registry+https://github.com/rust-lang/crates.io-index" 1047 + checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a" 1048 + dependencies = [ 1049 + "once_cell", 1050 + ] 1051 + 1052 + [[package]] 1053 + name = "unicode-ident" 1054 + version = "1.0.24" 1055 + source = "registry+https://github.com/rust-lang/crates.io-index" 1056 + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" 1057 + 1058 + [[package]] 1059 + name = "version_check" 1060 + version = "0.9.5" 1061 + source = "registry+https://github.com/rust-lang/crates.io-index" 1062 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 1063 + 1064 + [[package]] 1065 + name = "wasi" 1066 + version = "0.11.1+wasi-snapshot-preview1" 1067 + source = "registry+https://github.com/rust-lang/crates.io-index" 1068 + checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 1069 + 1070 + [[package]] 1071 + name = "wasm-bindgen" 1072 + version = "0.2.118" 1073 + source = "registry+https://github.com/rust-lang/crates.io-index" 1074 + checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" 1075 + dependencies = [ 1076 + "cfg-if", 1077 + "once_cell", 1078 + "rustversion", 1079 + "wasm-bindgen-macro", 1080 + "wasm-bindgen-shared", 1081 + ] 1082 + 1083 + [[package]] 1084 + name = "wasm-bindgen-macro" 1085 + version = "0.2.118" 1086 + source = "registry+https://github.com/rust-lang/crates.io-index" 1087 + checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" 1088 + dependencies = [ 1089 + "quote", 1090 + "wasm-bindgen-macro-support", 1091 + ] 1092 + 1093 + [[package]] 1094 + name = "wasm-bindgen-macro-support" 1095 + version = "0.2.118" 1096 + source = "registry+https://github.com/rust-lang/crates.io-index" 1097 + checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" 1098 + dependencies = [ 1099 + "bumpalo", 1100 + "proc-macro2", 1101 + "quote", 1102 + "syn 2.0.117", 1103 + "wasm-bindgen-shared", 1104 + ] 1105 + 1106 + [[package]] 1107 + name = "wasm-bindgen-shared" 1108 + version = "0.2.118" 1109 + source = "registry+https://github.com/rust-lang/crates.io-index" 1110 + checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" 1111 + dependencies = [ 1112 + "unicode-ident", 1113 + ] 1114 + 1115 + [[package]] 1116 + name = "winapi" 1117 + version = "0.3.9" 1118 + source = "registry+https://github.com/rust-lang/crates.io-index" 1119 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1120 + dependencies = [ 1121 + "winapi-i686-pc-windows-gnu", 1122 + "winapi-x86_64-pc-windows-gnu", 1123 + ] 1124 + 1125 + [[package]] 1126 + name = "winapi-i686-pc-windows-gnu" 1127 + version = "0.4.0" 1128 + source = "registry+https://github.com/rust-lang/crates.io-index" 1129 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1130 + 1131 + [[package]] 1132 + name = "winapi-x86_64-pc-windows-gnu" 1133 + version = "0.4.0" 1134 + source = "registry+https://github.com/rust-lang/crates.io-index" 1135 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1136 + 1137 + [[package]] 1138 + name = "windows-core" 1139 + version = "0.62.2" 1140 + source = "registry+https://github.com/rust-lang/crates.io-index" 1141 + checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" 1142 + dependencies = [ 1143 + "windows-implement", 1144 + "windows-interface", 1145 + "windows-link", 1146 + "windows-result", 1147 + "windows-strings", 1148 + ] 1149 + 1150 + [[package]] 1151 + name = "windows-implement" 1152 + version = "0.60.2" 1153 + source = "registry+https://github.com/rust-lang/crates.io-index" 1154 + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" 1155 + dependencies = [ 1156 + "proc-macro2", 1157 + "quote", 1158 + "syn 2.0.117", 1159 + ] 1160 + 1161 + [[package]] 1162 + name = "windows-interface" 1163 + version = "0.59.3" 1164 + source = "registry+https://github.com/rust-lang/crates.io-index" 1165 + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" 1166 + dependencies = [ 1167 + "proc-macro2", 1168 + "quote", 1169 + "syn 2.0.117", 1170 + ] 1171 + 1172 + [[package]] 1173 + name = "windows-link" 1174 + version = "0.2.1" 1175 + source = "registry+https://github.com/rust-lang/crates.io-index" 1176 + checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" 1177 + 1178 + [[package]] 1179 + name = "windows-result" 1180 + version = "0.4.1" 1181 + source = "registry+https://github.com/rust-lang/crates.io-index" 1182 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 1183 + dependencies = [ 1184 + "windows-link", 1185 + ] 1186 + 1187 + [[package]] 1188 + name = "windows-strings" 1189 + version = "0.5.1" 1190 + source = "registry+https://github.com/rust-lang/crates.io-index" 1191 + checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" 1192 + dependencies = [ 1193 + "windows-link", 1194 + ] 1195 + 1196 + [[package]] 1197 + name = "windows-sys" 1198 + version = "0.61.2" 1199 + source = "registry+https://github.com/rust-lang/crates.io-index" 1200 + checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" 1201 + dependencies = [ 1202 + "windows-link", 1203 + ] 1204 + 1205 + [[package]] 1206 + name = "zmij" 1207 + version = "1.0.21" 1208 + source = "registry+https://github.com/rust-lang/crates.io-index" 1209 + checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
+10
Cargo.toml
··· 1 + [package] 2 + name = "problem_generator" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies] 7 + axum = "0.8.9" 8 + genpdf = { version = "0.2.0", features = ["hyphenation"] } 9 + hyphenation = { version = "0.8.4", features = ["embed_en-us"] } 10 + tokio = { version = "1.52.1", features = ["rt-multi-thread"] }
+35
README.md
··· 1 + # Problem set generator 2 + 3 + API to generate random problem sets by subject. 4 + WIP for now. 5 + 6 + 7 + ## Format 8 + 9 + GET request that will return a `application/pdf`, with generated questions, and page of answers. 10 + 11 + Path would be `https://$url/<Subject>/<Theme>/<Option<Pages>>` 12 + 13 + - `Subject` being Math or Physics, 14 + - `Theme` breakdown by subject, representing a single chapter in Mechanics by taylor or 15 + Multivariable Calculus by Stewart. 16 + - `Pages` optional how many pages you would like, default being 1. 17 + - On error, a string with api documentation would be returned? (openapi generated docs would be nice) 18 + 19 + ## Goals 20 + - [ ] Create handler function to extract problem request parameters 21 + - [ ] Write a question bank by chapter (separate text files) 22 + - [ ] Write question parser, with number generator for questions ( variables encoded in question text with `{{ }}` potentially?) 23 + - [ ] Port axum to run on [shuttle.dev](https://www.shuttle.dev/) 24 + - [ ] Write a front-end page with a basic form that would open a new tab with the pdf requested on [my website](https://tangled.org/sevenpigeons.ca/sevenpigeons.ca) 25 + 26 + ## Fonts 27 + 28 + I am not sure about distributing Roboto font for now, please add 29 + 30 + - `Roboto-Bold.ttf` 31 + - `Roboto-BoldItalic.ttf` 32 + - `Roboto-Italic.ttf` 33 + - `Roboto-Regular.ttf` 34 + 35 + in the `fonts` folder, you get get it from [google fonts](fonts.google.com/specimen/Roboto)
+86
src/main.rs
··· 1 + use genpdf::{elements::{self, Paragraph}, fonts::FontData, style}; 2 + use hyphenation::{Load, Standard}; 3 + 4 + 5 + use axum::{Router, extract::{Path, State}, http::{HeaderMap, header}, response::IntoResponse, routing::get}; 6 + 7 + #[derive(Clone)] 8 + pub struct GenpdfState { 9 + pub font_family:genpdf::fonts::FontFamily<FontData>, 10 + pub hyphenator: Standard 11 + } 12 + 13 + 14 + async fn send_pdf( 15 + State(state):State<GenpdfState>, 16 + key: Option<Path<i32>>) 17 + -> impl IntoResponse { 18 + 19 + 20 + let len = match key { 21 + Some(Path(a)) => a, 22 + None => 1, 23 + }; 24 + 25 + // this block should be really moved somewhere in a function 26 + let mut doc = genpdf::Document::new(state.font_family); 27 + doc.set_title("Test document title"); 28 + let mut decorator = genpdf::SimplePageDecorator::new(); 29 + decorator.set_margins(10); 30 + doc.set_page_decorator(decorator); 31 + let mut title = Paragraph::default(); 32 + title.push_styled("title", style::Effect::Bold); 33 + title.set_alignment(genpdf::Alignment::Center); 34 + doc.push(title); 35 + 36 + 37 + 38 + doc.push(elements::Break::new(5)); 39 + doc.set_hyphenator(state.hyphenator); 40 + 41 + for i in 0..len { 42 + doc.push( 43 + genpdf::elements::Paragraph::new( 44 + format!("this is line {}", i) 45 + )); 46 + 47 + 48 + } 49 + 50 + let mut headers = HeaderMap::new(); 51 + headers.insert(header::CONTENT_TYPE, "application/pdf".parse().unwrap()); 52 + 53 + 54 + 55 + let mut w: Vec<u8> = vec![]; 56 + let _ = doc.render(&mut w).expect("error during pdf rendering"); 57 + (headers,w.clone()) 58 + } 59 + 60 + 61 + #[tokio::main] 62 + async fn main() { 63 + 64 + let en_us = Standard::from_embedded(hyphenation::Language::EnglishUS).unwrap(); 65 + let font_family = match genpdf::fonts::from_files("./fonts", "Roboto", None) { 66 + Ok(a) => a, 67 + Err(err) => panic!("errpr {err}") 68 + }; 69 + 70 + let genpdf_state = GenpdfState { 71 + font_family:font_family, 72 + hyphenator:en_us 73 + }; 74 + 75 + let routes = Router::new() 76 + .route("/{key}", get(send_pdf)) 77 + .route("/", get(send_pdf)) 78 + .with_state(genpdf_state); 79 + 80 + 81 + 82 + let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); 83 + axum::serve(listener,routes).await.unwrap(); 84 + 85 + 86 + }