From 521b13211aac9e5f0c005bd0a1f804ec1e19b187 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 11 Apr 2021 17:01:48 +0200 Subject: Get PDF file path from free command line argument Add 'getopts' to parse command line arguments. Replace `--fill` argument condition with 'getopts'. Replace the hard-coded PDF file path with one from the command line argument. --- Cargo.lock | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index c1779ef..ae4aeee 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -332,11 +332,21 @@ name = "formurapid" version = "0.0.1" dependencies = [ "derive_builder", + "getopts", "pdf_forms", "serde", "toml", ] +[[package]] +name = "getopts" +version = "0.2.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" +dependencies = [ + "unicode-width", +] + [[package]] name = "gif" version = "0.11.2" @@ -854,6 +864,12 @@ dependencies = [ "serde", ] +[[package]] +name = "unicode-width" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" + [[package]] name = "unicode-xid" version = "0.0.4" -- cgit v1.2.3