Skip to content

Commit

Permalink
Minor help cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Nov 22, 2023
1 parent 958b10c commit ed12b94
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions martin/src/bin/martin-cp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ const PROGRESS_REPORT_EVERY: Duration = Duration::from_secs(2);
const BATCH_SIZE: usize = 1000;

#[derive(Parser, Debug, PartialEq, Default)]
#[command(about, version)]
#[command(
about = "A tool to bulk copy tiles from any Martin-supported sources into an mbtiles file",
version
)]
pub struct CopierArgs {
#[command(flatten)]
pub copy: CopyArgs,
Expand All @@ -46,15 +49,14 @@ pub struct CopierArgs {

#[serde_with::serde_as]
#[derive(clap::Args, Debug, PartialEq, Default, serde::Deserialize, serde::Serialize)]
#[command(about, version)]
pub struct CopyArgs {
/// Name of the source to copy from.
#[arg(short, long)]
pub source: String,
/// Path to the mbtiles file to copy to.
#[arg(short, long)]
pub output_file: PathBuf,
/// Output format of the destination file, ignored if the file exists. For new files, defaults to 'normalized'.
/// Output format of the new destination file. Ignored if the file exists. Defaults to 'normalized'.
#[arg(
long = "mbtiles-type",
alias = "dst-type",
Expand All @@ -66,8 +68,9 @@ pub struct CopyArgs {
#[arg(long)]
pub url_query: Option<String>,
/// Optional accepted encoding parameter as if the browser sent it in the HTTP request.
/// May be multiple values separated by comma, e.g. `gzip,br`.
/// Use `identity` to disable compression.
/// If set to multiple values like `gzip,br`, martin-cp will use the first encoding,
/// or re-encode if the tile is already encoded and that encoding is not listed.
/// Use `identity` to disable compression. Ignored for non-encodable tiles like PNG and JPEG.
#[arg(long, alias = "encodings", default_value = "gzip")]
pub encoding: String,
/// Specify the behaviour when generated tile already exists in the destination file.
Expand All @@ -76,7 +79,7 @@ pub struct CopyArgs {
/// Number of concurrent connections to use.
#[arg(long, default_value = "1")]
pub concurrency: Option<usize>,
/// Bounds to copy. Can be specified multiple times.
/// Bounds to copy. Can be specified multiple times. Overlapping regions will be handled correctly.
#[arg(long)]
pub bbox: Vec<Bounds>,
/// Minimum zoom level to copy
Expand Down

0 comments on commit ed12b94

Please sign in to comment.