Builds a PDF resume from a json file

feat(init): Json -> Rust

+3
.gitignore
··· 1 + /target 2 + config.json 3 + result
+794
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-tzdata" 13 + version = "0.1.1" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 16 + 17 + [[package]] 18 + name = "android_system_properties" 19 + version = "0.1.5" 20 + source = "registry+https://github.com/rust-lang/crates.io-index" 21 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 22 + dependencies = [ 23 + "libc", 24 + ] 25 + 26 + [[package]] 27 + name = "approx" 28 + version = "0.3.2" 29 + source = "registry+https://github.com/rust-lang/crates.io-index" 30 + checksum = "f0e60b75072ecd4168020818c0107f2857bb6c4e64252d8d3983f6263b40a5c3" 31 + dependencies = [ 32 + "num-traits", 33 + ] 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 = "base-x" 43 + version = "0.2.11" 44 + source = "registry+https://github.com/rust-lang/crates.io-index" 45 + checksum = "4cbbc9d0964165b47557570cce6c952866c2678457aca742aafc9fb771d30270" 46 + 47 + [[package]] 48 + name = "bstr" 49 + version = "1.12.0" 50 + source = "registry+https://github.com/rust-lang/crates.io-index" 51 + checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" 52 + dependencies = [ 53 + "memchr", 54 + "regex-automata", 55 + "serde", 56 + ] 57 + 58 + [[package]] 59 + name = "bumpalo" 60 + version = "3.19.0" 61 + source = "registry+https://github.com/rust-lang/crates.io-index" 62 + checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" 63 + 64 + [[package]] 65 + name = "byteorder" 66 + version = "1.5.0" 67 + source = "registry+https://github.com/rust-lang/crates.io-index" 68 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 69 + 70 + [[package]] 71 + name = "cc" 72 + version = "1.2.34" 73 + source = "registry+https://github.com/rust-lang/crates.io-index" 74 + checksum = "42bc4aea80032b7bf409b0bc7ccad88853858911b7713a8062fdc0623867bedc" 75 + dependencies = [ 76 + "shlex", 77 + ] 78 + 79 + [[package]] 80 + name = "cfg-if" 81 + version = "1.0.3" 82 + source = "registry+https://github.com/rust-lang/crates.io-index" 83 + checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" 84 + 85 + [[package]] 86 + name = "chrono" 87 + version = "0.4.41" 88 + source = "registry+https://github.com/rust-lang/crates.io-index" 89 + checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" 90 + dependencies = [ 91 + "android-tzdata", 92 + "iana-time-zone", 93 + "js-sys", 94 + "num-traits", 95 + "serde", 96 + "wasm-bindgen", 97 + "windows-link", 98 + ] 99 + 100 + [[package]] 101 + name = "const_fn" 102 + version = "0.4.11" 103 + source = "registry+https://github.com/rust-lang/crates.io-index" 104 + checksum = "2f8a2ca5ac02d09563609681103aada9e1777d54fc57a5acd7a41404f9c93b6e" 105 + 106 + [[package]] 107 + name = "core-foundation-sys" 108 + version = "0.8.7" 109 + source = "registry+https://github.com/rust-lang/crates.io-index" 110 + checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 111 + 112 + [[package]] 113 + name = "crc32fast" 114 + version = "1.5.0" 115 + source = "registry+https://github.com/rust-lang/crates.io-index" 116 + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 117 + dependencies = [ 118 + "cfg-if", 119 + ] 120 + 121 + [[package]] 122 + name = "derive_more" 123 + version = "0.99.20" 124 + source = "registry+https://github.com/rust-lang/crates.io-index" 125 + checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" 126 + dependencies = [ 127 + "proc-macro2", 128 + "quote", 129 + "syn 2.0.106", 130 + ] 131 + 132 + [[package]] 133 + name = "discard" 134 + version = "1.0.4" 135 + source = "registry+https://github.com/rust-lang/crates.io-index" 136 + checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 137 + 138 + [[package]] 139 + name = "dtoa" 140 + version = "0.4.8" 141 + source = "registry+https://github.com/rust-lang/crates.io-index" 142 + checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" 143 + 144 + [[package]] 145 + name = "encoding" 146 + version = "0.2.33" 147 + source = "registry+https://github.com/rust-lang/crates.io-index" 148 + checksum = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" 149 + dependencies = [ 150 + "encoding-index-japanese", 151 + "encoding-index-korean", 152 + "encoding-index-simpchinese", 153 + "encoding-index-singlebyte", 154 + "encoding-index-tradchinese", 155 + ] 156 + 157 + [[package]] 158 + name = "encoding-index-japanese" 159 + version = "1.20141219.5" 160 + source = "registry+https://github.com/rust-lang/crates.io-index" 161 + checksum = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" 162 + dependencies = [ 163 + "encoding_index_tests", 164 + ] 165 + 166 + [[package]] 167 + name = "encoding-index-korean" 168 + version = "1.20141219.5" 169 + source = "registry+https://github.com/rust-lang/crates.io-index" 170 + checksum = "4dc33fb8e6bcba213fe2f14275f0963fd16f0a02c878e3095ecfdf5bee529d81" 171 + dependencies = [ 172 + "encoding_index_tests", 173 + ] 174 + 175 + [[package]] 176 + name = "encoding-index-simpchinese" 177 + version = "1.20141219.5" 178 + source = "registry+https://github.com/rust-lang/crates.io-index" 179 + checksum = "d87a7194909b9118fc707194baa434a4e3b0fb6a5a757c73c3adb07aa25031f7" 180 + dependencies = [ 181 + "encoding_index_tests", 182 + ] 183 + 184 + [[package]] 185 + name = "encoding-index-singlebyte" 186 + version = "1.20141219.5" 187 + source = "registry+https://github.com/rust-lang/crates.io-index" 188 + checksum = "3351d5acffb224af9ca265f435b859c7c01537c0849754d3db3fdf2bfe2ae84a" 189 + dependencies = [ 190 + "encoding_index_tests", 191 + ] 192 + 193 + [[package]] 194 + name = "encoding-index-tradchinese" 195 + version = "1.20141219.5" 196 + source = "registry+https://github.com/rust-lang/crates.io-index" 197 + checksum = "fd0e20d5688ce3cab59eb3ef3a2083a5c77bf496cb798dc6fcdb75f323890c18" 198 + dependencies = [ 199 + "encoding_index_tests", 200 + ] 201 + 202 + [[package]] 203 + name = "encoding_index_tests" 204 + version = "0.1.4" 205 + source = "registry+https://github.com/rust-lang/crates.io-index" 206 + checksum = "a246d82be1c9d791c5dfde9a2bd045fc3cbba3fa2b11ad558f27d01712f00569" 207 + 208 + [[package]] 209 + name = "flate2" 210 + version = "1.1.2" 211 + source = "registry+https://github.com/rust-lang/crates.io-index" 212 + checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" 213 + dependencies = [ 214 + "crc32fast", 215 + "miniz_oxide", 216 + ] 217 + 218 + [[package]] 219 + name = "genpdf" 220 + version = "0.2.0" 221 + source = "registry+https://github.com/rust-lang/crates.io-index" 222 + checksum = "a1c422344482708cb32db843cf3f55f27918cd24fec7b505bde895a1e8702c34" 223 + dependencies = [ 224 + "derive_more", 225 + "lopdf", 226 + "printpdf", 227 + "rusttype", 228 + ] 229 + 230 + [[package]] 231 + name = "iana-time-zone" 232 + version = "0.1.63" 233 + source = "registry+https://github.com/rust-lang/crates.io-index" 234 + checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 235 + dependencies = [ 236 + "android_system_properties", 237 + "core-foundation-sys", 238 + "iana-time-zone-haiku", 239 + "js-sys", 240 + "log", 241 + "wasm-bindgen", 242 + "windows-core", 243 + ] 244 + 245 + [[package]] 246 + name = "iana-time-zone-haiku" 247 + version = "0.1.2" 248 + source = "registry+https://github.com/rust-lang/crates.io-index" 249 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 250 + dependencies = [ 251 + "cc", 252 + ] 253 + 254 + [[package]] 255 + name = "itoa" 256 + version = "0.4.8" 257 + source = "registry+https://github.com/rust-lang/crates.io-index" 258 + checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 259 + 260 + [[package]] 261 + name = "itoa" 262 + version = "1.0.15" 263 + source = "registry+https://github.com/rust-lang/crates.io-index" 264 + checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 265 + 266 + [[package]] 267 + name = "js-sys" 268 + version = "0.3.77" 269 + source = "registry+https://github.com/rust-lang/crates.io-index" 270 + checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 271 + dependencies = [ 272 + "once_cell", 273 + "wasm-bindgen", 274 + ] 275 + 276 + [[package]] 277 + name = "libc" 278 + version = "0.2.175" 279 + source = "registry+https://github.com/rust-lang/crates.io-index" 280 + checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" 281 + 282 + [[package]] 283 + name = "linked-hash-map" 284 + version = "0.5.6" 285 + source = "registry+https://github.com/rust-lang/crates.io-index" 286 + checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" 287 + 288 + [[package]] 289 + name = "log" 290 + version = "0.4.27" 291 + source = "registry+https://github.com/rust-lang/crates.io-index" 292 + checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 293 + 294 + [[package]] 295 + name = "lopdf" 296 + version = "0.26.0" 297 + source = "registry+https://github.com/rust-lang/crates.io-index" 298 + checksum = "b49a0272112719d0037ab63d4bb67f73ba659e1e90bc38f235f163a457ac16f3" 299 + dependencies = [ 300 + "chrono", 301 + "dtoa", 302 + "encoding", 303 + "flate2", 304 + "itoa 0.4.8", 305 + "linked-hash-map", 306 + "log", 307 + "lzw", 308 + "pom", 309 + "time", 310 + ] 311 + 312 + [[package]] 313 + name = "lzw" 314 + version = "0.10.0" 315 + source = "registry+https://github.com/rust-lang/crates.io-index" 316 + checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084" 317 + 318 + [[package]] 319 + name = "memchr" 320 + version = "2.7.5" 321 + source = "registry+https://github.com/rust-lang/crates.io-index" 322 + checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" 323 + 324 + [[package]] 325 + name = "miniz_oxide" 326 + version = "0.8.9" 327 + source = "registry+https://github.com/rust-lang/crates.io-index" 328 + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 329 + dependencies = [ 330 + "adler2", 331 + ] 332 + 333 + [[package]] 334 + name = "num-traits" 335 + version = "0.2.19" 336 + source = "registry+https://github.com/rust-lang/crates.io-index" 337 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 338 + dependencies = [ 339 + "autocfg", 340 + ] 341 + 342 + [[package]] 343 + name = "once_cell" 344 + version = "1.21.3" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 347 + 348 + [[package]] 349 + name = "ordered-float" 350 + version = "1.1.1" 351 + source = "registry+https://github.com/rust-lang/crates.io-index" 352 + checksum = "3305af35278dd29f46fcdd139e0b1fbfae2153f0e5928b39b035542dd31e37b7" 353 + dependencies = [ 354 + "num-traits", 355 + ] 356 + 357 + [[package]] 358 + name = "pom" 359 + version = "3.4.0" 360 + source = "registry+https://github.com/rust-lang/crates.io-index" 361 + checksum = "6c972d8f86e943ad532d0b04e8965a749ad1d18bb981a9c7b3ae72fe7fd7744b" 362 + dependencies = [ 363 + "bstr", 364 + ] 365 + 366 + [[package]] 367 + name = "printpdf" 368 + version = "0.3.4" 369 + source = "registry+https://github.com/rust-lang/crates.io-index" 370 + checksum = "1a2472a184bcb128d0e3db65b59ebd11d010259a5e14fd9d048cba8f2c9302d4" 371 + dependencies = [ 372 + "js-sys", 373 + "lopdf", 374 + "rusttype", 375 + "time", 376 + ] 377 + 378 + [[package]] 379 + name = "proc-macro-hack" 380 + version = "0.5.20+deprecated" 381 + source = "registry+https://github.com/rust-lang/crates.io-index" 382 + checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" 383 + 384 + [[package]] 385 + name = "proc-macro2" 386 + version = "1.0.101" 387 + source = "registry+https://github.com/rust-lang/crates.io-index" 388 + checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" 389 + dependencies = [ 390 + "unicode-ident", 391 + ] 392 + 393 + [[package]] 394 + name = "quote" 395 + version = "1.0.40" 396 + source = "registry+https://github.com/rust-lang/crates.io-index" 397 + checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 398 + dependencies = [ 399 + "proc-macro2", 400 + ] 401 + 402 + [[package]] 403 + name = "regex-automata" 404 + version = "0.4.10" 405 + source = "registry+https://github.com/rust-lang/crates.io-index" 406 + checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" 407 + 408 + [[package]] 409 + name = "resume_builder" 410 + version = "0.1.0" 411 + dependencies = [ 412 + "chrono", 413 + "genpdf", 414 + "serde", 415 + "serde_json", 416 + ] 417 + 418 + [[package]] 419 + name = "rustc_version" 420 + version = "0.2.3" 421 + source = "registry+https://github.com/rust-lang/crates.io-index" 422 + checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 423 + dependencies = [ 424 + "semver", 425 + ] 426 + 427 + [[package]] 428 + name = "rusttype" 429 + version = "0.8.3" 430 + source = "registry+https://github.com/rust-lang/crates.io-index" 431 + checksum = "9f61411055101f7b60ecf1041d87fb74205fb20b0c7a723f07ef39174cf6b4c0" 432 + dependencies = [ 433 + "approx", 434 + "ordered-float", 435 + "stb_truetype", 436 + ] 437 + 438 + [[package]] 439 + name = "rustversion" 440 + version = "1.0.22" 441 + source = "registry+https://github.com/rust-lang/crates.io-index" 442 + checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" 443 + 444 + [[package]] 445 + name = "ryu" 446 + version = "1.0.20" 447 + source = "registry+https://github.com/rust-lang/crates.io-index" 448 + checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 449 + 450 + [[package]] 451 + name = "semver" 452 + version = "0.9.0" 453 + source = "registry+https://github.com/rust-lang/crates.io-index" 454 + checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 455 + dependencies = [ 456 + "semver-parser", 457 + ] 458 + 459 + [[package]] 460 + name = "semver-parser" 461 + version = "0.7.0" 462 + source = "registry+https://github.com/rust-lang/crates.io-index" 463 + checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 464 + 465 + [[package]] 466 + name = "serde" 467 + version = "1.0.219" 468 + source = "registry+https://github.com/rust-lang/crates.io-index" 469 + checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 470 + dependencies = [ 471 + "serde_derive", 472 + ] 473 + 474 + [[package]] 475 + name = "serde_derive" 476 + version = "1.0.219" 477 + source = "registry+https://github.com/rust-lang/crates.io-index" 478 + checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 479 + dependencies = [ 480 + "proc-macro2", 481 + "quote", 482 + "syn 2.0.106", 483 + ] 484 + 485 + [[package]] 486 + name = "serde_json" 487 + version = "1.0.143" 488 + source = "registry+https://github.com/rust-lang/crates.io-index" 489 + checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" 490 + dependencies = [ 491 + "itoa 1.0.15", 492 + "memchr", 493 + "ryu", 494 + "serde", 495 + ] 496 + 497 + [[package]] 498 + name = "sha1" 499 + version = "0.6.1" 500 + source = "registry+https://github.com/rust-lang/crates.io-index" 501 + checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 502 + dependencies = [ 503 + "sha1_smol", 504 + ] 505 + 506 + [[package]] 507 + name = "sha1_smol" 508 + version = "1.0.1" 509 + source = "registry+https://github.com/rust-lang/crates.io-index" 510 + checksum = "bbfa15b3dddfee50a0fff136974b3e1bde555604ba463834a7eb7deb6417705d" 511 + 512 + [[package]] 513 + name = "shlex" 514 + version = "1.3.0" 515 + source = "registry+https://github.com/rust-lang/crates.io-index" 516 + checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 517 + 518 + [[package]] 519 + name = "standback" 520 + version = "0.2.17" 521 + source = "registry+https://github.com/rust-lang/crates.io-index" 522 + checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 523 + dependencies = [ 524 + "version_check", 525 + ] 526 + 527 + [[package]] 528 + name = "stb_truetype" 529 + version = "0.3.1" 530 + source = "registry+https://github.com/rust-lang/crates.io-index" 531 + checksum = "f77b6b07e862c66a9f3e62a07588fee67cd90a9135a2b942409f195507b4fb51" 532 + dependencies = [ 533 + "byteorder", 534 + ] 535 + 536 + [[package]] 537 + name = "stdweb" 538 + version = "0.4.20" 539 + source = "registry+https://github.com/rust-lang/crates.io-index" 540 + checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 541 + dependencies = [ 542 + "discard", 543 + "rustc_version", 544 + "stdweb-derive", 545 + "stdweb-internal-macros", 546 + "stdweb-internal-runtime", 547 + "wasm-bindgen", 548 + ] 549 + 550 + [[package]] 551 + name = "stdweb-derive" 552 + version = "0.5.3" 553 + source = "registry+https://github.com/rust-lang/crates.io-index" 554 + checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 555 + dependencies = [ 556 + "proc-macro2", 557 + "quote", 558 + "serde", 559 + "serde_derive", 560 + "syn 1.0.109", 561 + ] 562 + 563 + [[package]] 564 + name = "stdweb-internal-macros" 565 + version = "0.2.9" 566 + source = "registry+https://github.com/rust-lang/crates.io-index" 567 + checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 568 + dependencies = [ 569 + "base-x", 570 + "proc-macro2", 571 + "quote", 572 + "serde", 573 + "serde_derive", 574 + "serde_json", 575 + "sha1", 576 + "syn 1.0.109", 577 + ] 578 + 579 + [[package]] 580 + name = "stdweb-internal-runtime" 581 + version = "0.1.5" 582 + source = "registry+https://github.com/rust-lang/crates.io-index" 583 + checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 584 + 585 + [[package]] 586 + name = "syn" 587 + version = "1.0.109" 588 + source = "registry+https://github.com/rust-lang/crates.io-index" 589 + checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 590 + dependencies = [ 591 + "proc-macro2", 592 + "quote", 593 + "unicode-ident", 594 + ] 595 + 596 + [[package]] 597 + name = "syn" 598 + version = "2.0.106" 599 + source = "registry+https://github.com/rust-lang/crates.io-index" 600 + checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" 601 + dependencies = [ 602 + "proc-macro2", 603 + "quote", 604 + "unicode-ident", 605 + ] 606 + 607 + [[package]] 608 + name = "time" 609 + version = "0.2.27" 610 + source = "registry+https://github.com/rust-lang/crates.io-index" 611 + checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 612 + dependencies = [ 613 + "const_fn", 614 + "libc", 615 + "standback", 616 + "stdweb", 617 + "time-macros", 618 + "version_check", 619 + "winapi", 620 + ] 621 + 622 + [[package]] 623 + name = "time-macros" 624 + version = "0.1.1" 625 + source = "registry+https://github.com/rust-lang/crates.io-index" 626 + checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 627 + dependencies = [ 628 + "proc-macro-hack", 629 + "time-macros-impl", 630 + ] 631 + 632 + [[package]] 633 + name = "time-macros-impl" 634 + version = "0.1.2" 635 + source = "registry+https://github.com/rust-lang/crates.io-index" 636 + checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 637 + dependencies = [ 638 + "proc-macro-hack", 639 + "proc-macro2", 640 + "quote", 641 + "standback", 642 + "syn 1.0.109", 643 + ] 644 + 645 + [[package]] 646 + name = "unicode-ident" 647 + version = "1.0.18" 648 + source = "registry+https://github.com/rust-lang/crates.io-index" 649 + checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 650 + 651 + [[package]] 652 + name = "version_check" 653 + version = "0.9.5" 654 + source = "registry+https://github.com/rust-lang/crates.io-index" 655 + checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 656 + 657 + [[package]] 658 + name = "wasm-bindgen" 659 + version = "0.2.100" 660 + source = "registry+https://github.com/rust-lang/crates.io-index" 661 + checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 662 + dependencies = [ 663 + "cfg-if", 664 + "once_cell", 665 + "rustversion", 666 + "wasm-bindgen-macro", 667 + ] 668 + 669 + [[package]] 670 + name = "wasm-bindgen-backend" 671 + version = "0.2.100" 672 + source = "registry+https://github.com/rust-lang/crates.io-index" 673 + checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 674 + dependencies = [ 675 + "bumpalo", 676 + "log", 677 + "proc-macro2", 678 + "quote", 679 + "syn 2.0.106", 680 + "wasm-bindgen-shared", 681 + ] 682 + 683 + [[package]] 684 + name = "wasm-bindgen-macro" 685 + version = "0.2.100" 686 + source = "registry+https://github.com/rust-lang/crates.io-index" 687 + checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 688 + dependencies = [ 689 + "quote", 690 + "wasm-bindgen-macro-support", 691 + ] 692 + 693 + [[package]] 694 + name = "wasm-bindgen-macro-support" 695 + version = "0.2.100" 696 + source = "registry+https://github.com/rust-lang/crates.io-index" 697 + checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 698 + dependencies = [ 699 + "proc-macro2", 700 + "quote", 701 + "syn 2.0.106", 702 + "wasm-bindgen-backend", 703 + "wasm-bindgen-shared", 704 + ] 705 + 706 + [[package]] 707 + name = "wasm-bindgen-shared" 708 + version = "0.2.100" 709 + source = "registry+https://github.com/rust-lang/crates.io-index" 710 + checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 711 + dependencies = [ 712 + "unicode-ident", 713 + ] 714 + 715 + [[package]] 716 + name = "winapi" 717 + version = "0.3.9" 718 + source = "registry+https://github.com/rust-lang/crates.io-index" 719 + checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 720 + dependencies = [ 721 + "winapi-i686-pc-windows-gnu", 722 + "winapi-x86_64-pc-windows-gnu", 723 + ] 724 + 725 + [[package]] 726 + name = "winapi-i686-pc-windows-gnu" 727 + version = "0.4.0" 728 + source = "registry+https://github.com/rust-lang/crates.io-index" 729 + checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 730 + 731 + [[package]] 732 + name = "winapi-x86_64-pc-windows-gnu" 733 + version = "0.4.0" 734 + source = "registry+https://github.com/rust-lang/crates.io-index" 735 + checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 736 + 737 + [[package]] 738 + name = "windows-core" 739 + version = "0.61.2" 740 + source = "registry+https://github.com/rust-lang/crates.io-index" 741 + checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" 742 + dependencies = [ 743 + "windows-implement", 744 + "windows-interface", 745 + "windows-link", 746 + "windows-result", 747 + "windows-strings", 748 + ] 749 + 750 + [[package]] 751 + name = "windows-implement" 752 + version = "0.60.0" 753 + source = "registry+https://github.com/rust-lang/crates.io-index" 754 + checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" 755 + dependencies = [ 756 + "proc-macro2", 757 + "quote", 758 + "syn 2.0.106", 759 + ] 760 + 761 + [[package]] 762 + name = "windows-interface" 763 + version = "0.59.1" 764 + source = "registry+https://github.com/rust-lang/crates.io-index" 765 + checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" 766 + dependencies = [ 767 + "proc-macro2", 768 + "quote", 769 + "syn 2.0.106", 770 + ] 771 + 772 + [[package]] 773 + name = "windows-link" 774 + version = "0.1.3" 775 + source = "registry+https://github.com/rust-lang/crates.io-index" 776 + checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" 777 + 778 + [[package]] 779 + name = "windows-result" 780 + version = "0.3.4" 781 + source = "registry+https://github.com/rust-lang/crates.io-index" 782 + checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" 783 + dependencies = [ 784 + "windows-link", 785 + ] 786 + 787 + [[package]] 788 + name = "windows-strings" 789 + version = "0.4.2" 790 + source = "registry+https://github.com/rust-lang/crates.io-index" 791 + checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" 792 + dependencies = [ 793 + "windows-link", 794 + ]
+10
Cargo.toml
··· 1 + [package] 2 + name = "resume_builder" 3 + version = "0.1.0" 4 + edition = "2024" 5 + 6 + [dependencies] 7 + chrono = { version = "0.4.41", features = ["serde"] } 8 + genpdf = "0.2.0" 9 + serde = { version = "1.0.219", features = ["derive"] } 10 + serde_json = "1.0.143"
+73
nilla.nix
··· 1 + let 2 + pins = import ./npins; 3 + 4 + nilla = import pins.nilla; 5 + in 6 + nilla.create ({ config }: { 7 + config = { 8 + inputs = { 9 + fenix = { 10 + src = pins.fenix; 11 + }; 12 + 13 + nixpkgs = { 14 + src = pins.nixpkgs; 15 + 16 + settings = { 17 + overlays = [ 18 + config.inputs.fenix.result.overlays.default 19 + ]; 20 + }; 21 + }; 22 + }; 23 + 24 + packages.default = config.packages.resume; 25 + packages.resume = { 26 + systems = [ "x86_64-linux" "aarch64-linux" ]; 27 + 28 + package = { fenix, makeRustPlatform, lib, installShellFiles, ... }: 29 + let 30 + toolchain = fenix.complete.toolchain; 31 + 32 + manifest = (lib.importTOML ./Cargo.toml).package; 33 + 34 + platform = makeRustPlatform { 35 + cargo = toolchain; 36 + rustc = toolchain; 37 + }; 38 + in 39 + platform.buildRustPackage { 40 + meta.mainProgram = "resume_builder"; 41 + pname = manifest.name; 42 + version = manifest.version; 43 + 44 + src = ./.; 45 + 46 + nativeBuildInputs = [ installShellFiles ]; 47 + 48 + cargoLock.lockFile = ./Cargo.lock; 49 + }; 50 + }; 51 + 52 + shells.default = config.shells.pdf; 53 + shells.pdf = { 54 + systems = [ "x86_64-linux" ]; 55 + 56 + shell = { mkShell, fenix, bacon, pkg-config, ... }: 57 + mkShell { 58 + packages = [ 59 + (fenix.complete.withComponents [ 60 + "cargo" 61 + "clippy" 62 + "rust-src" 63 + "rustc" 64 + "rustfmt" 65 + "rust-analyzer" 66 + ]) 67 + bacon 68 + pkg-config 69 + ]; 70 + }; 71 + }; 72 + }; 73 + })
+210
npins/default.nix
··· 1 + /* 2 + This file is provided under the MIT licence: 3 + 4 + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 + 6 + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 + 8 + THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 + */ 10 + # Generated by npins. Do not modify; will be overwritten regularly 11 + let 12 + # Backwards-compatibly make something that previously didn't take any arguments take some 13 + # The function must return an attrset, and will unfortunately be eagerly evaluated 14 + # Same thing, but it catches eval errors on the default argument so that one may still call it with other arguments 15 + mkFunctor = 16 + fn: 17 + let 18 + e = (builtins.tryEval (fn { })); 19 + in 20 + (if e.success then e.value else { error = fn { }; }) // { __functor = _self: fn; }; 21 + 22 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/lists.nix#L295 23 + range = 24 + first: last: if first > last then [ ] else builtins.genList (n: first + n) (last - first + 1); 25 + 26 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L257 27 + stringToCharacters = s: map (p: builtins.substring p 1 s) (range 0 (builtins.stringLength s - 1)); 28 + 29 + # https://github.com/NixOS/nixpkgs/blob/0258808f5744ca980b9a1f24fe0b1e6f0fecee9c/lib/strings.nix#L269 30 + stringAsChars = f: s: concatStrings (map f (stringToCharacters s)); 31 + concatMapStrings = f: list: concatStrings (map f list); 32 + concatStrings = builtins.concatStringsSep ""; 33 + 34 + # If the environment variable NPINS_OVERRIDE_${name} is set, then use 35 + # the path directly as opposed to the fetched source. 36 + # (Taken from Niv for compatibility) 37 + mayOverride = 38 + name: path: 39 + let 40 + envVarName = "NPINS_OVERRIDE_${saneName}"; 41 + saneName = stringAsChars (c: if (builtins.match "[a-zA-Z0-9]" c) == null then "_" else c) name; 42 + ersatz = builtins.getEnv envVarName; 43 + in 44 + if ersatz == "" then 45 + path 46 + else 47 + # this turns the string into an actual Nix path (for both absolute and 48 + # relative paths) 49 + builtins.trace "Overriding path of \"${name}\" with \"${ersatz}\" due to set \"${envVarName}\"" ( 50 + if builtins.substring 0 1 ersatz == "/" then 51 + /. + ersatz 52 + else 53 + /. + builtins.getEnv "PWD" + "/${ersatz}" 54 + ); 55 + 56 + mkSource = 57 + name: spec: 58 + { 59 + pkgs ? null, 60 + }: 61 + assert spec ? type; 62 + let 63 + # Unify across builtin and pkgs fetchers. 64 + # `fetchGit` requires a wrapper because of slight API differences. 65 + fetchers = 66 + if pkgs == null then 67 + { 68 + inherit (builtins) fetchTarball fetchurl; 69 + # For some fucking reason, fetchGit has a different signature than the other builtin fetchers … 70 + fetchGit = args: (builtins.fetchGit args).outPath; 71 + } 72 + else 73 + { 74 + fetchTarball = pkgs.fetchzip; 75 + inherit (pkgs) fetchurl; 76 + fetchGit = 77 + { 78 + url, 79 + submodules, 80 + rev, 81 + name, 82 + narHash, 83 + }: 84 + pkgs.fetchgit { 85 + inherit url rev name; 86 + fetchSubmodules = submodules; 87 + hash = narHash; 88 + }; 89 + }; 90 + 91 + # Dispatch to the correct code path based on the type 92 + path = 93 + if spec.type == "Git" then 94 + mkGitSource fetchers spec 95 + else if spec.type == "GitRelease" then 96 + mkGitSource fetchers spec 97 + else if spec.type == "PyPi" then 98 + mkPyPiSource fetchers spec 99 + else if spec.type == "Channel" then 100 + mkChannelSource fetchers spec 101 + else if spec.type == "Tarball" then 102 + mkTarballSource fetchers spec 103 + else 104 + builtins.throw "Unknown source type ${spec.type}"; 105 + in 106 + spec // { outPath = mayOverride name path; }; 107 + 108 + mkGitSource = 109 + { fetchTarball, fetchGit, ... }: 110 + { 111 + repository, 112 + revision, 113 + url ? null, 114 + submodules, 115 + hash, 116 + branch ? null, 117 + ... 118 + }: 119 + assert repository ? type; 120 + # At the moment, either it is a plain git repository (which has an url), or it is a GitHub/GitLab repository 121 + # In the latter case, there we will always be an url to the tarball 122 + if url != null && !submodules then 123 + fetchTarball { 124 + inherit url; 125 + sha256 = hash; 126 + } 127 + else 128 + let 129 + url = 130 + if repository.type == "Git" then 131 + repository.url 132 + else if repository.type == "GitHub" then 133 + "https://github.com/${repository.owner}/${repository.repo}.git" 134 + else if repository.type == "GitLab" then 135 + "${repository.server}/${repository.repo_path}.git" 136 + else 137 + throw "Unrecognized repository type ${repository.type}"; 138 + urlToName = 139 + url: rev: 140 + let 141 + matched = builtins.match "^.*/([^/]*)(\\.git)?$" url; 142 + 143 + short = builtins.substring 0 7 rev; 144 + 145 + appendShort = if (builtins.match "[a-f0-9]*" rev) != null then "-${short}" else ""; 146 + in 147 + "${if matched == null then "source" else builtins.head matched}${appendShort}"; 148 + name = urlToName url revision; 149 + in 150 + fetchGit { 151 + rev = revision; 152 + narHash = hash; 153 + 154 + inherit name submodules url; 155 + }; 156 + 157 + mkPyPiSource = 158 + { fetchurl, ... }: 159 + { url, hash, ... }: 160 + fetchurl { 161 + inherit url; 162 + sha256 = hash; 163 + }; 164 + 165 + mkChannelSource = 166 + { fetchTarball, ... }: 167 + { url, hash, ... }: 168 + fetchTarball { 169 + inherit url; 170 + sha256 = hash; 171 + }; 172 + 173 + mkTarballSource = 174 + { fetchTarball, ... }: 175 + { 176 + url, 177 + locked_url ? url, 178 + hash, 179 + ... 180 + }: 181 + fetchTarball { 182 + url = locked_url; 183 + sha256 = hash; 184 + }; 185 + in 186 + mkFunctor ( 187 + { 188 + input ? ./sources.json, 189 + }: 190 + let 191 + data = 192 + if builtins.isPath input then 193 + # while `readFile` will throw an error anyways if the path doesn't exist, 194 + # we still need to check beforehand because *our* error can be caught but not the one from the builtin 195 + # *piegames sighs* 196 + if builtins.pathExists input then 197 + builtins.fromJSON (builtins.readFile input) 198 + else 199 + throw "Input path ${toString input} does not exist" 200 + else if builtins.isAttrs input then 201 + input 202 + else 203 + throw "Unsupported input type ${builtins.typeOf input}, must be a path or an attrset"; 204 + version = data.version; 205 + in 206 + if version == 6 then 207 + builtins.mapAttrs (name: spec: mkFunctor (mkSource name spec)) data.pins 208 + else 209 + throw "Unsupported format version ${toString version} in sources.json. Try running `npins upgrade`" 210 + )
+44
npins/sources.json
··· 1 + { 2 + "pins": { 3 + "fenix": { 4 + "type": "Git", 5 + "repository": { 6 + "type": "GitHub", 7 + "owner": "nix-community", 8 + "repo": "fenix" 9 + }, 10 + "branch": "monthly", 11 + "submodules": false, 12 + "revision": "451f184de2958f8e725acba046ec10670dd771a1", 13 + "url": "https://github.com/nix-community/fenix/archive/451f184de2958f8e725acba046ec10670dd771a1.tar.gz", 14 + "hash": "sha256-EA7Qh5OUc3tgYrLHfG7zU6wxltvWsJ0+sFxOcVsbjOY=" 15 + }, 16 + "nilla": { 17 + "type": "Git", 18 + "repository": { 19 + "type": "GitHub", 20 + "owner": "nilla-nix", 21 + "repo": "nilla" 22 + }, 23 + "branch": "main", 24 + "submodules": false, 25 + "revision": "2e98ae315a592ad6b6de44670514c048dcc88dc7", 26 + "url": "https://github.com/nilla-nix/nilla/archive/2e98ae315a592ad6b6de44670514c048dcc88dc7.tar.gz", 27 + "hash": "sha256-15lwhWcMonJH6UholMMHDc+p2BoSpGA4AYGrsXQA9Do=" 28 + }, 29 + "nixpkgs": { 30 + "type": "Git", 31 + "repository": { 32 + "type": "GitHub", 33 + "owner": "nixos", 34 + "repo": "nixpkgs" 35 + }, 36 + "branch": "nixos-unstable", 37 + "submodules": false, 38 + "revision": "dfb2f12e899db4876308eba6d93455ab7da304cd", 39 + "url": "https://github.com/nixos/nixpkgs/archive/dfb2f12e899db4876308eba6d93455ab7da304cd.tar.gz", 40 + "hash": "sha256-1wxxznpW2CKvI9VdniaUnTT2Os6rdRJcRUf65ZK9OtE=" 41 + } 42 + }, 43 + "version": 6 44 + }
+57
src/main.rs
··· 1 + use serde::{Deserialize, Serialize}; 2 + 3 + #[derive(Serialize, Deserialize, Debug)] 4 + enum PositionType { 5 + FullTime, 6 + PartTime, 7 + Seasonal, 8 + Contractor, 9 + } 10 + 11 + #[derive(Serialize, Deserialize, Debug)] 12 + struct Experience { 13 + place_of_work: String, 14 + position_type: PositionType, 15 + start_date: chrono::DateTime<chrono::Utc>, 16 + end_date: Option<chrono::DateTime<chrono::Utc>>, 17 + job_title: String, 18 + skills: Option<Vec<String>>, 19 + } 20 + 21 + #[derive(Serialize, Deserialize, Debug)] 22 + struct Education { 23 + level: String, 24 + school_name: String, 25 + major: Option<String>, 26 + minor: Option<String>, 27 + start_date: chrono::DateTime<chrono::Utc>, 28 + end_date: Option<chrono::DateTime<chrono::Utc>>, 29 + } 30 + 31 + #[derive(Serialize, Deserialize, Debug)] 32 + struct Certification { 33 + name: String, 34 + link: Option<String>, 35 + description: String, 36 + } 37 + 38 + #[derive(Serialize, Deserialize, Debug)] 39 + struct Config { 40 + full_name: String, 41 + website: Option<String>, 42 + email: Option<String>, 43 + phone: Option<String>, 44 + summary: Option<String>, 45 + skills: Option<Vec<String>>, 46 + experience: Option<Vec<Experience>>, 47 + education: Option<Vec<Education>>, 48 + certifications: Option<Vec<Certification>>, 49 + } 50 + 51 + fn main() { 52 + let config_path = std::env::var("RB_CONFIG_PATH").unwrap(); 53 + let config_file = std::fs::read(config_path).unwrap(); 54 + let config: Config = serde_json::from_slice(&config_file).unwrap(); 55 + 56 + println!("{config:#?}"); 57 + }