Skip to content

Commit

Permalink
expose svg style argument to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkirk committed Jan 15, 2025
1 parent db3ec2d commit 2e4fa75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions geozero-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ struct Cli {

/// The path to the file to write
dest: PathBuf,

/// Will be placed within <style>...</style> tags of the top level svg element.
#[arg(long)]
svg_style: Option<String>
}

#[derive(Copy, Clone, Debug, PartialEq)]
Expand Down Expand Up @@ -123,6 +127,7 @@ async fn process(args: Cli) -> Result<()> {
let extent = get_extent(&args).await?;
let mut processor = SvgWriter::new(&mut fout, true);
// TODO: get width/height from args
processor.set_style(args.svg_style.clone());
processor.set_dimensions(extent.minx, extent.miny, extent.maxx, extent.maxy, 800, 600);
transform(&args, &mut processor).await?;
}
Expand Down

0 comments on commit 2e4fa75

Please sign in to comment.