aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukeflo2025-10-10 15:09:48 +0200
committerlukeflo2025-10-10 15:09:48 +0200
commit418d2f3874c8e86c4b58143115ee3d4181130f9c (patch)
treeb3415844251c3d0a1b0b7e37a92325834c089edf
parentc69b1789fabaf149916d160922d7026f2cbe33f1 (diff)
downloadbibiman-418d2f3874c8e86c4b58143115ee3d4181130f9c.tar.gz
bibiman-418d2f3874c8e86c4b58143115ee3d4181130f9c.zip
add dry-run information to --help function
-rw-r--r--src/bibiman/citekeys.rs11
-rw-r--r--src/config.rs15
2 files changed, 26 insertions, 0 deletions
diff --git a/src/bibiman/citekeys.rs b/src/bibiman/citekeys.rs
index 7c06886..f7704fb 100644
--- a/src/bibiman/citekeys.rs
+++ b/src/bibiman/citekeys.rs
@@ -238,6 +238,17 @@ fn formatting_help() {
",
"-h, --help".fg::<White>().bold()
),
+ formatdoc!(
+ "
+ \t{}
+ \tDon't apply any changes to the named files. Instead print all
+ \told citekeys and the formatted strings that would have been
+ \tapplied in the format: {} => {}
+ ",
+ "-d, --dry-run".fg::<White>().bold(),
+ "old_key".italic(),
+ "new_key".bold()
+ ),
formatdoc! {"
\t{}
\tThe bibfile for which the citekey formatting should be processed.
diff --git a/src/config.rs b/src/config.rs
index a4e89be..b1c4b07 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -103,6 +103,21 @@ const DEFAULT_CONFIG: &str = r##"
# author_color = "38"
# title_color = "37"
# year_color = "135"
+
+# [citekey_formatter]
+## Define the patterns for creating citekeys. Every item of the array consists of
+## five components separated by semicolons. Despite the field name every component
+## can be left blank:
+## - name of the biblatex field ("author", "title"...)
+## - number of max words from the given field
+## - number of chars used from each word
+## - delimiter to separate words of the same field
+## - trailing delimiter separating the current field from the following
+# fields = [ "author;2;;-;_", "title;3;6;_;_", "year" ]
+
+## Convert chars to specified case. Possible values:
+## "upper", "uppercase", "lower", "lowercase"
+# case = "lowercase"
"##;
/// Main struct of the config file. Contains substructs/headings in toml