mirror of
https://github.com/YGGverse/btracker-gemini.git
synced 2026-03-31 09:05:30 +00:00
add description argument option
This commit is contained in:
parent
e8e2369564
commit
0e79c21da6
2 changed files with 9 additions and 0 deletions
|
|
@ -12,6 +12,10 @@ pub struct Config {
|
|||
#[arg(short, long, default_value_t = String::from("βtracker"))]
|
||||
pub name: String,
|
||||
|
||||
/// Server description
|
||||
#[arg(short, long)]
|
||||
pub description: Option<String>,
|
||||
|
||||
/// Date format
|
||||
#[arg(short, long, default_value_t = String::from("%Y/%m/%d"))]
|
||||
pub format_date: String,
|
||||
|
|
|
|||
|
|
@ -278,7 +278,12 @@ fn index(config: &Config, public: &Public, page: Option<usize>) -> Result<String
|
|||
|
||||
b.push(format!("# {}\n", config.name));
|
||||
|
||||
if let Some(ref description) = config.description {
|
||||
b.push(format!("{description}\n"));
|
||||
}
|
||||
|
||||
if let Some(ref trackers) = config.tracker {
|
||||
b.push(format!("## Connect\n"));
|
||||
b.push("```".into());
|
||||
for tracker in trackers {
|
||||
b.push(tracker.to_string());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue