You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: improve CLI line breaks and markdown-handling (#1736)
During #1720 I noticed that there are a few places in the CLI where a
few more line breaks and handling markdown better could help
readability.
Yes, this adds the `unstable-markdown` feature of clap, but given that
removal would only impact the CLI-Formatting, I think here the risk is
okay.
Tracking issue:
- clap-rs/clap#5900
Hidden rationale:
I have one place in #1720 where making it readable without markdown
formatting is nearly impossible
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/src/run-with-cli.md
+21-10
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
## Command-line Interface
2
2
3
-
You can configure Martin using command-line interface. See `martin --help` or `cargo run -- --help` for more
4
-
information.
3
+
You can configure Martin using command-line interface.
4
+
See `martin --help` or `cargo run -- --help` for more information:
5
5
6
6
```text
7
+
Blazing fast and lightweight tile server with PostGIS, MBTiles, and PMTiles support
8
+
7
9
Usage: martin [OPTIONS] [CONNECTION]...
8
10
9
11
Arguments:
@@ -15,7 +17,8 @@ Options:
15
17
Path to config file. If set, no tile source-related parameters are allowed
16
18
17
19
--save-config <SAVE_CONFIG>
18
-
Save resulting config to a file or use "-" to print to stdout. By default, only print if sources are auto-detected
20
+
Save resulting config to a file or use "-" to print to stdout.
21
+
By default, only print if sources are auto-detected
19
22
20
23
-C, --cache-size <CACHE_SIZE>
21
24
Main cache size (in MB)
@@ -33,24 +36,30 @@ Options:
33
36
The socket address to bind. [DEFAULT: 0.0.0.0:3000]
34
37
35
38
--base-path <BASE_PATH>
36
-
Set TileJSON URL path prefix. This overrides the default of respecting the X-Rewrite-URL header.
37
-
Only modifies the JSON (TileJSON) returned, martins' API-URLs remain unchanged. If you need to rewrite URLs, please use a reverse proxy.
38
-
Must begin with a `/`.
39
-
Examples: `/`, `/tiles`
39
+
Set TileJSON URL path prefix.
40
+
41
+
This overrides the default of respecting the X-Rewrite-URL header.
42
+
Only modifies the JSON (TileJSON) returned, martins' API-URLs remain unchanged.
43
+
If you need to rewrite URLs, please use a reverse proxy.
44
+
Must begin with a /.
45
+
46
+
Examples: /, /tiles
40
47
41
48
-W, --workers <WORKERS>
42
49
Number of web server workers
43
50
44
51
--preferred-encoding <PREFERRED_ENCODING>
45
-
Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to gzip
52
+
Martin server preferred tile encoding. [DEFAULT: gzip]
53
+
54
+
If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. gzip is faster, but brotli is smaller, and may be faster with caching.
46
55
47
56
[possible values: brotli, gzip]
48
57
49
58
-u, --webui <WEB_UI>
50
-
Control Martin web UI. Disabled by default
59
+
Control Martin web UI. [DEFAULT: disabled]
51
60
52
61
Possible values:
53
-
- disable: Disable Web UI interface. This is the default, but once implemented, the default will be enabled for localhost
62
+
- disable: Disable Web UI interface. This is the default, but once implemented, the default will be enabled for localhost.
54
63
- enable-for-all: Enable Web UI interface on all connections
55
64
56
65
-b, --auto-bounds <AUTO_BOUNDS>
@@ -78,4 +87,6 @@ Options:
78
87
79
88
-V, --version
80
89
Print version
90
+
91
+
Use RUST_LOG environment variable to control logging level, e.g. RUST_LOG=debug or RUST_LOG=martin=debug. See https://docs.rs/env_logger/latest/env_logger/index.html#enabling-logging for more information.
/// Set TileJSON URL path prefix. This overrides the default of respecting the X-Rewrite-URL header.
15
-
/// Only modifies the JSON (TileJSON) returned, martins' API-URLs remain unchanged. If you need to rewrite URLs, please use a reverse proxy.
14
+
/// Set TileJSON URL path prefix.
15
+
///
16
+
/// This overrides the default of respecting the X-Rewrite-URL header.
17
+
/// Only modifies the JSON (TileJSON) returned, martins' API-URLs remain unchanged.
18
+
/// If you need to rewrite URLs, please use a reverse proxy.
16
19
/// Must begin with a `/`.
20
+
///
17
21
/// Examples: `/`, `/tiles`
18
22
#[arg(long)]
19
23
pubbase_path:Option<String>,
20
24
/// Number of web server workers
21
25
#[arg(short = 'W', long)]
22
26
pubworkers:Option<usize>,
23
-
/// Martin server preferred tile encoding. If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used. `gzip` is faster, but `brotli` is smaller, and may be faster with caching. Defaults to gzip.
27
+
/// Martin server preferred tile encoding. [DEFAULT: gzip]
28
+
///
29
+
/// If the client accepts multiple compression formats, and the tile source is not pre-compressed, which compression should be used.
30
+
/// `gzip` is faster, but `brotli` is smaller, and may be faster with caching.
0 commit comments