mirror of
https://github.com/YGGverse/htcount.git
synced 2026-03-31 09:05:41 +00:00
remove extra format argument
This commit is contained in:
parent
599435f1ab
commit
1f349cd7c7
3 changed files with 1 additions and 23 deletions
14
README.md
14
README.md
|
|
@ -4,16 +4,11 @@
|
|||
[](https://deps.rs/repo/github/YGGverse/htcount)
|
||||
[](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 <FORMAT>
|
||||
Log format for given `source`
|
||||
|
||||
* `nginx`
|
||||
|
||||
[default: nginx]
|
||||
|
||||
--target-json <TARGET_JSON>
|
||||
Export results to JSON file (e.g. `/path/to/stats.json`)
|
||||
|
||||
|
|
|
|||
|
|
@ -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<String>,
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue