diff options
| author | lukeflo | 2025-08-23 21:29:35 +0200 |
|---|---|---|
| committer | lukeflo | 2025-08-23 21:29:35 +0200 |
| commit | 71632fca42977560aaf77dd521b0b6b51319ec17 (patch) | |
| tree | 651d5cbaf8cc94a5eb05c84866b0f05a720ca0f0 /src/config.rs | |
| parent | 2c1e8342b29b36e09ec90a1cb3d5819c7143273c (diff) | |
| download | bibiman-71632fca42977560aaf77dd521b0b6b51319ec17.tar.gz bibiman-71632fca42977560aaf77dd521b0b6b51319ec17.zip | |
implement a customizable fourth column for `EntryTable`
+ Now one can select a fourth column to be displayed in the config file
+ Possible values: journaltitle, organization, institution, publisher, pubtype
+ Defaults to pubtype
Diffstat (limited to 'src/config.rs')
| -rw-r--r-- | src/config.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/config.rs b/src/config.rs index 4e46fdd..e3798e4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -30,7 +30,7 @@ use figment::{ use ratatui::style::Color; use serde::{Deserialize, Serialize}; -use crate::cliargs::CLIArgs; +use crate::{bibiman::bibisetup::CustomField, cliargs::CLIArgs}; const DEFAULT_CONFIG: &str = r##" # [general] @@ -67,6 +67,11 @@ const DEFAULT_CONFIG: &str = r##" # file_symbol = "F" # link_symbol = "L" +## Select a custom column beside standard "author", "title" and "year" +## Possible values are "journaltitle", "organization", "instituion", "publisher" +## and "pubtype" (which is the default) +# custom_column = "pubtype" + # [colors] ## Default values for dark-themed terminal ## Possible values are: @@ -113,6 +118,7 @@ pub struct General { pub note_symbol: String, pub file_symbol: String, pub link_symbol: String, + pub custom_column: CustomField, } /// Substruct [colors] in config.toml @@ -152,6 +158,7 @@ impl Default for BibiConfig { note_symbol: String::from("N"), file_symbol: String::from("F"), link_symbol: String::from("L"), + custom_column: CustomField::Pubtype, }, colors: Self::dark_colors(), } @@ -173,6 +180,7 @@ impl BibiConfig { note_symbol: String::from("N"), file_symbol: String::from("F"), link_symbol: String::from("L"), + custom_column: CustomField::Pubtype, }, colors: if args.light_theme { Self::light_colors() |
