From 1f349cd7c763fcd04e40fa50e7bc63ae2ba45d36 Mon Sep 17 00:00:00 2001 From: yggverse Date: Tue, 10 Jun 2025 01:53:05 +0300 Subject: [PATCH] remove extra `format` argument --- README.md | 14 +------------- src/argument.rs | 6 ------ src/main.rs | 4 ---- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/README.md b/README.md index 3a0fda4..9b928da 100644 --- a/README.md +++ b/README.md @@ -4,16 +4,11 @@ [![Dependencies](https://deps.rs/repo/github/YGGverse/htcount/status.svg)](https://deps.rs/repo/github/YGGverse/htcount) [![crates.io](https://img.shields.io/crates/v/htcount.svg)](https://crates.io/crates/htcount) -Simple CLI/daemon tool for counting visitors using `access.log`\ +Simple CLI/daemon tool for counting visitors using `access.log` in the [Common Log Format](https://en.wikipedia.org/wiki/Common_Log_Format)\ Export totals in multiple formats, such as JSON or SVG [badge](https://github.com/YGGverse/htcount/tree/main/default)! ## Features -### Log format support - -* [x] Nginx -* [ ] Apache - ### Export formats * [x] JSON - for API usage @@ -44,13 +39,6 @@ htcount --source /var/log/nginx/access.log\ [default: i] --f, --format - Log format for given `source` - - * `nginx` - - [default: nginx] - --target-json Export results to JSON file (e.g. `/path/to/stats.json`) diff --git a/src/argument.rs b/src/argument.rs index c7b1663..80939d7 100644 --- a/src/argument.rs +++ b/src/argument.rs @@ -10,12 +10,6 @@ pub struct Argument { #[arg(short, long, default_value_t = String::from("i"))] pub debug: String, - /// Log format for given `source` - /// - /// * `nginx` - #[arg(short, long, default_value_t = String::from("nginx"))] - pub format: String, - /// Export results to JSON file (e.g. `/path/to/stats.json`) #[arg(long)] pub target_json: Option, diff --git a/src/main.rs b/src/main.rs index 11c6597..5399c0f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,10 +19,6 @@ fn main() -> anyhow::Result<()> { let is_debug_i = argument.debug.contains("i"); let is_debug_d = argument.debug.contains("d"); - if !matches!(argument.format.to_lowercase().as_str(), "nginx") { - todo!("Format `{}` yet not supported!", argument.format) - } - if is_debug_i { debug::info("Crawler started"); }