Compare commits
2 commits
4d4d0d336b
...
343e43a762
| Author | SHA1 | Date | |
|---|---|---|---|
| 343e43a762 | |||
| 1e5d328ab4 |
4 changed files with 22 additions and 2 deletions
|
|
@ -3,11 +3,17 @@ name = "entomologist"
|
|||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
log = ["dep:log", "dep:simple_logger"]
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0.95"
|
||||
clap = { version = "4.5.26", features = ["derive"] }
|
||||
log = { version = "0.4.27", optional = true }
|
||||
rand = "0.9.1"
|
||||
serde = { version = "1.0.217", features = ["derive"] }
|
||||
simple_logger = { version = "5.0.0", optional = true }
|
||||
tempfile = "3.20.0"
|
||||
thiserror = "2.0.11"
|
||||
toml = "0.8.19"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
use clap::Parser;
|
||||
|
||||
#[cfg(feature = "log")]
|
||||
use simple_logger;
|
||||
|
||||
#[derive(Debug, clap::Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
|
|
@ -85,6 +88,9 @@ fn handle_command(args: &Args, issues_dir: &std::path::Path) -> anyhow::Result<(
|
|||
}
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
#[cfg(feature = "log")]
|
||||
simple_logger::SimpleLogger::new().env().init().unwrap();
|
||||
|
||||
let args: Args = Args::parse();
|
||||
// println!("{:?}", args);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,9 @@
|
|||
use std::io::Write;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[cfg(feature = "log")]
|
||||
use log::debug;
|
||||
|
||||
#[derive(Debug, PartialEq, serde::Deserialize)]
|
||||
/// These are the states an issue can be in.
|
||||
pub enum State {
|
||||
|
|
@ -83,7 +86,8 @@ impl Issue {
|
|||
dependencies = Some(deps);
|
||||
}
|
||||
} else {
|
||||
println!("ignoring unknown file in issue directory: {:?}", file_name);
|
||||
#[cfg(feature = "log")]
|
||||
debug!("ignoring unknown file in issue directory: {:?}", file_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
#[cfg(feature = "log")]
|
||||
use log::debug;
|
||||
|
||||
// Just a placeholder for now, get rid of this if we don't need it.
|
||||
#[derive(Debug, PartialEq, serde::Deserialize)]
|
||||
pub struct Config {}
|
||||
|
|
@ -56,7 +59,8 @@ impl Issues {
|
|||
} else if direntry.file_name() == "config.toml" {
|
||||
issues.parse_config(direntry.path().as_path())?;
|
||||
} else {
|
||||
println!(
|
||||
#[cfg(feature = "log")]
|
||||
debug!(
|
||||
"ignoring unknown file in issues directory: {:?}",
|
||||
direntry.file_name()
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue