diff --git a/Cargo.lock b/Cargo.lock index 69131df..24d6488 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -11,15 +11,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ansi_term" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -dependencies = [ - "winapi", -] - [[package]] name = "atty" version = "0.2.14" @@ -85,12 +76,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -121,41 +106,55 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "d2dbdf4bdacb33466e854ce889eee8dfd5729abf7ccd7664d0a2d60cd384440b" dependencies = [ - "ansi_term", "atty", "bitflags", + "clap_derive", + "clap_lex", + "indexmap", + "lazy_static", "strsim", + "termcolor", "textwrap", - "unicode-width", - "vec_map", +] + +[[package]] +name = "clap_derive" +version = "3.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25320346e922cffe59c0bbc5410c8d8784509efb321488971081313cb1e1a33c" +dependencies = [ + "heck", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "clap_lex" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213" +dependencies = [ + "os_str_bytes", ] [[package]] name = "crossbeam" -version = "0.7.3" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" +checksum = "4ae5588f6b3c3cb05239e90bd110f257254aecd01e4635400391aeae07497845" dependencies = [ - "cfg-if 0.1.10", - "crossbeam-channel 0.4.4", + "cfg-if", + "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", "crossbeam-queue", - "crossbeam-utils 0.7.2", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crossbeam-utils", ] [[package]] @@ -164,56 +163,43 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.5", + "cfg-if", + "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ + "cfg-if", "crossbeam-epoch", - "crossbeam-utils 0.7.2", - "maybe-uninit", + "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.8.2" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ "autocfg", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", + "cfg-if", + "crossbeam-utils", "lazy_static", - "maybe-uninit", "memoffset", "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.2.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", + "cfg-if", + "crossbeam-utils", ] [[package]] @@ -222,7 +208,7 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "lazy_static", ] @@ -253,7 +239,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall", "winapi", @@ -289,9 +275,9 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", ] [[package]] @@ -318,6 +304,18 @@ dependencies = [ "walkdir", ] +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" + +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -339,7 +337,7 @@ version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "713f1b139373f96a2e0ce3ac931cd01ee973c3c5dd7c40c0c2efe96ad2b6751d" dependencies = [ - "crossbeam-utils 0.8.5", + "crossbeam-utils", "globset", "lazy_static", "log", @@ -351,6 +349,16 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "indexmap" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" +dependencies = [ + "autocfg", + "hashbrown", +] + [[package]] name = "inotify" version = "0.9.4" @@ -379,9 +387,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "json5" -version = "0.2.8" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb2522ff59fbfefb955e9bd44d04d5e5c2d0e8865bfc2c3d1ab3916183ef5ee" +checksum = "96b0db21af676c1ce64250b5f40f3ce2cf27e4e47cb91ed91eb6fe9350b430c1" dependencies = [ "pest", "pest_derive", @@ -416,9 +424,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.103" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8f7255a17a627354f321ef0055d63b898c6fb27eff628af4d1b66b7331edf6" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "log" @@ -426,7 +434,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -435,12 +443,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.4.1" @@ -449,43 +451,33 @@ checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] name = "memoffset" -version = "0.5.6" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" dependencies = [ "autocfg", ] [[package]] name = "mio" -version = "0.7.13" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2bdb6314ec10835cd3293dd268473a835c02b7b352e788be788b3c6ca6bb16" +checksum = "713d550d9b44d89174e066b7a6217ae06234c10cb47819a88290d2b353c31799" dependencies = [ "libc", "log", - "miow", - "ntapi", - "winapi", -] - -[[package]] -name = "miow" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" -dependencies = [ - "winapi", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys", ] [[package]] name = "notify" -version = "5.0.0-pre.13" +version = "5.0.0-pre.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245d358380e2352c2d020e8ee62baac09b3420f1f6c012a31326cfced4ad487d" +checksum = "553f9844ad0b0824605c20fb55a661679782680410abfb1a8144c2e7e437e7a7" dependencies = [ "bitflags", - "crossbeam-channel 0.5.1", + "crossbeam-channel", "filetime", "fsevent-sys", "inotify", @@ -496,15 +488,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "ntapi" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" -dependencies = [ - "winapi", -] - [[package]] name = "num-integer" version = "0.1.44" @@ -536,6 +519,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" +[[package]] +name = "os_str_bytes" +version = "6.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21326818e99cfe6ce1e524c2a805c189a99b5ae555a35d19f9a284b427d86afa" + [[package]] name = "panres" version = "0.1.0" @@ -613,6 +602,30 @@ version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + [[package]] name = "proc-macro2" version = "1.0.29" @@ -758,9 +771,9 @@ dependencies = [ [[package]] name = "strsim" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" @@ -796,14 +809,20 @@ dependencies = [ ] [[package]] -name = "textwrap" -version = "0.11.0" +name = "termcolor" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ - "unicode-width", + "winapi-util", ] +[[package]] +name = "textwrap" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb" + [[package]] name = "thread_local" version = "1.1.3" @@ -875,12 +894,6 @@ dependencies = [ "unic-common", ] -[[package]] -name = "unicode-width" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -888,10 +901,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" [[package]] -name = "vec_map" -version = "0.8.2" +name = "version_check" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -910,6 +923,12 @@ version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "winapi" version = "0.3.9" @@ -940,3 +959,46 @@ 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-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" diff --git a/Cargo.toml b/Cargo.toml index d2618c9..09d0aad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,13 +2,13 @@ name = "panres" version = "0.1.0" authors = ["Edward Shen "] -edition = "2018" +edition = "2021" [dependencies] -tera = "1.0.0-beta.13" -clap = "2" +tera = "1" +clap = { version = "3", features = ["derive", "cargo"] } serde = "1" -serde_json = "1.0" -json5 = "0.2.8" -notify = "5.0.0-pre.3" -crossbeam = "0.7" +serde_json = "1" +json5 = "0.4" +notify = "5.0.0-pre.15" +crossbeam = "0.8" diff --git a/config.json5 b/config.json5 index c6661de..84be6c7 100644 --- a/config.json5 +++ b/config.json5 @@ -30,10 +30,10 @@ "name": "honors", "desc": "3.85 / 4.00; summa cum laude; Dean's List" }, - { - "name": "courses", - "desc": "Networks and Distributed Systems; Network Security; Programming Languages; Machine Learning/Data Mining 1; Algorithms and Data" - } + // { + // "name": "courses", + // "desc": "Networks and Distributed Systems; Network Security; Programming Languages; Machine Learning/Data Mining 1; Algorithms and Data" + // } ] }, "skills": [ @@ -64,10 +64,23 @@ } ], "experiences": [ + { + "title": "Production Engineer", + "company": "Meta", + "location": "Menlo Park, CA", + "start": "Sept. 2021", + "end": "Present", + "notes": [ + "Joined the PE Executable Access Control team to identify, track, and jail untrusted binaries running on internal hosts.", + "Tech lead for Alcatraz, an internal binary that presents common frontend for process-level jailing backends.", + "Advocate for Rust adoption, volunteering for Rust code reviews and presenting Rust talks to teams.", + ] + }, { "title": "Security Engineering and Architecture Intern", "company": "Apple", - "location": "Menlo Park, CA", + "location": "Cupertino, CA", + "remote": true, "start": "Aug. 2020", "end": "Dec. 2020", "notes": [ @@ -80,12 +93,12 @@ "title": "Production Engineer Intern", "company": "Facebook", "location": "Menlo Park, CA", + "remote": true, "start": "May 2020", "end": "Aug. 2020", "notes": [ "Rewritten Python config generation in multithreaded asynchronous Rust, reducing overall runtime by 80\\% on large inputs and improving runtime of profiled areas by a factor of 36.6.", "Designed core Rust libraries for foundational services for ubiquitous use across all Rust applications.", - "Detected and resolved soundness issues and misconfigurations in existing python code to preempt Severity 1 site events.", "Highlighted as a top intern project for the Production Engineering organization." ] }, @@ -97,7 +110,6 @@ "end": "Dec. 2019", "notes": [ "Refactored frontend codebase to utilize Typescript, Webpack, and Babel while reducing average JS footprint by 98\\% percent, from 10.4MB to 250KB.", - "Assisted and completed developer environment virtualization project to reduce onboarding time for new developers by 5 days.", "Integrated into Scrum team that focused on re-implementation of license management systems in a legacy Ruby codebase to Scala and PHP." ] }, @@ -110,7 +122,6 @@ "notes": [ "Implemented a disaster mitigation for decentralized service discovery when upstream data source is unavailable or in a degraded state.", "Designed an out-of-band flow to allow resolution of core infrastructure services dependent on service discovery in disaster scenarios to minimize downtime for all Facebook products.", - "Modernized and restructured core tooling to improve reliability and testing." ] } ], diff --git a/src/main.rs b/src/main.rs index 426c764..d2f533b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ #![forbid(unsafe_code)] -use clap::{crate_authors, crate_version, App, AppSettings, Arg}; -use crossbeam::crossbeam_channel::unbounded; +use clap::{crate_authors, crate_version, Parser}; +use crossbeam::channel::unbounded; use json5::from_str; use notify::{RecommendedWatcher, RecursiveMode, Watcher}; use serde_json::Value; @@ -29,50 +29,39 @@ fn env_or_default(env_name: &str, default: &str) -> String { env::var(env_name).unwrap_or_else(|_| String::from(default)) } +/// Universal resume formatter +#[derive(Parser)] +#[clap(version = crate_version!(), author = crate_authors!())] +struct Args { + /// Watch for changes + #[clap(short)] + watch: bool, + /// Specifies which output format you want + #[clap(short, long, multiple_occurrences = true)] + output: Vec, +} + fn run() -> Result<(), Box> { let config: Value = from_str(&read_to_string("config.json5")?)?; let template_dir = env_or_default("PANRES_TEMPLATE_DIR", DEFAULT_TEMPLATE_DIR); let output_dir = env_or_default("PANRES_OUTPUT_DIR", DEFAULT_OUTPUT_DIR); - let matches = get_args(); + let args = Args::parse(); - let tera = Tera::new(&format!("{}/**/*", template_dir))?; + let tera = Tera::new(&format!("{template_dir}/**/*"))?; let mut context = Context::new(); context.insert("config", &config); - let outputs: Vec = matches - .values_of("output-format") - .unwrap_or_default() - .map(String::from) - .collect(); - let template_dir = PathBuf::from(template_dir); - output(&tera, &context, &output_dir, &outputs, &template_dir)?; + output(&tera, &context, &output_dir, &args.output, &template_dir)?; - if matches.is_present("watch") { - watch_mode(tera, context, output_dir, outputs, &template_dir)?; + if args.watch { + watch_mode(tera, context, output_dir, args.output, &template_dir)?; } Ok(()) } -/// Returns the args passed by the user. -fn get_args() -> clap::ArgMatches<'static> { - App::new("panres") - .version(crate_version!()) - .author(crate_authors!()) - .about("Universal resume formatter") - .arg(Arg::with_name("watch").short("w").help("Watch for changes")) - .arg( - Arg::with_name("output-format") - .help("Specifies which output format you want") - .required(true) - .multiple(true), - ) - .settings(&[AppSettings::ArgRequiredElseHelp]) - .get_matches() -} - /// Usually never returns, unless there was an error initializing the watcher. /// Handles watching for file changes, and reloads tera if there's a change. fn watch_mode( diff --git a/templates/latex b/templates/latex index db36d86..19cdf48 100644 --- a/templates/latex +++ b/templates/latex @@ -33,8 +33,30 @@ % Contact info +\begin{tabularx}{\textwidth}{c | r X r } +\sectiontitle{Experiences} +{% for experience in config.experiences -%} \\[-8pt] +{% raw -%} +& \widel{\large\title{% +{% endraw -%} +{{ experience.company }}}\hint{ {{experience.title }} }} & {{ experience.start }}---{{ experience.end }} \\ +& \widel{\footnotesize {{ experience.location }} +{% if experience.remote -%} +\color[rgb]{.8,.8,.8}{(Remote)} +{% endif -%} +} \\ +{% for note in experience.notes -%} +& \bullet +{% raw -%} +& \widex{% +{% endraw -%} +{{note}}} \\ +{% endfor -%} +{% endfor -%} +\end{tabularx} + \begin{tabularx}{\textwidth}{ c | r X r } -\sectiontitle{Education} \\[-8pt] +\sectiontitle{Degree} \\[-8pt] {% raw -%} & \widel{ {\large\title{% {% endraw -%} @@ -51,6 +73,7 @@ {{ row.desc }}} \\ {% endfor -%} +% Lol this spacer is for alignment of the two table sections \spacer \sectiontitle{Skills} \\[-8pt] @@ -77,24 +100,6 @@ {% endfor -%} \end{tabularx} -\begin{tabularx}{\textwidth}{c | r X r } -\sectiontitle{Experiences} -{% for experience in config.experiences -%} \\[-8pt] -{% raw -%} -& \widel{\large\title{% -{% endraw -%} -{{ experience.company }}}\hint{ {{experience.title }} }} & {{ experience.start }}---{{ experience.end }} \\ -& \widel{\footnotesize {{ experience.location }}} \\ -{% for note in experience.notes -%} -& \bullet -{% raw -%} -& \widex{% -{% endraw -%} -{{note}}} \\ -{% endfor -%} -{% endfor -%} -\end{tabularx} - % \begin{tabularx}{\textwidth}{c | r X r } % \sectiontitle{Projects} % {% for project in config.projects -%} \\[-8pt]