MCPcopy Create free account
hub / github.com/Notgnoshi/generative / CmdlineOptions

Class CmdlineOptions

tools/geom2graph.rs:32–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#[derive(Debug, Parser)]
31#[clap(name = "geom2graph", verbatim_doc_comment)]
32struct CmdlineOptions {
33 /// The log level
34 #[clap(short, long, default_value_t = tracing::Level::INFO)]
35 log_level: tracing::Level,
36
37 /// Input file to read input from. Defaults to stdin.
38 #[clap(short, long)]
39 input: Option<PathBuf>,
40
41 /// Output file to write result to. Defaults to stdout.
42 #[clap(short, long)]
43 output: Option<PathBuf>,
44
45 /// Format to output (the default) --graph2geom graphs as
46 #[clap(long, default_value_t = GraphFormat::Tgf)]
47 graph_format: GraphFormat,
48
49 /// Convert the given geometries to a graph. The default
50 #[clap(long, conflicts_with = "graph2geom")]
51 geom2graph: bool,
52
53 /// Convert the given graph into geometries.
54 #[clap(long, conflicts_with = "geom2graph")]
55 graph2geom: bool,
56
57 /// Snap together vertices closer than the given tolerance
58 #[clap(short, long)]
59 tolerance: Option<f64>,
60
61 /// The strategy to use for snapping
62 #[clap(long, default_value_t = CliSnappingStrategy::ClosestPoint)]
63 snap_strategy: CliSnappingStrategy,
64}
65
66fn main() -> eyre::Result<()> {
67 color_eyre::install()?;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected