Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

使用 MBTiles 归档

Martin 包含 mbtiles 实用程序,用于从命令行与 *.mbtiles 文件进行交互。 它允许用户检查、复制、验证或比较并应用它们之间的差异。

此工具可以通过使用 cargo install mbtiles --locked 编译最新发布版本来安装,或者从发布页面下载预构建的二进制文件。

使用 mbtiles --help 查看可用命令列表:

A utility to work with .mbtiles file content

Usage: mbtiles <COMMAND>

Commands:
  summary      Show MBTiles file summary statistics
  meta-all     Prints all values in the metadata table in a free-style, unstable YAML format
  meta-get     Gets a single value from the MBTiles metadata table
  meta-set     Sets a single value in the MBTiles metadata table or deletes it if no value
  diff         Compare two files A and B, and generate a new diff file. If the diff file is applied to A, it will produce B
  copy         Copy tiles from one mbtiles file to another
  apply-patch  Apply diff file generated from 'copy' command
  meta-update  Update metadata to match the content of the file
  validate     Validate tile data if hash of tile data exists in file
  help         Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version

Use RUST_LOG environment variable to control logging level, e.g. RUST_LOG=debug or RUST_LOG=mbtiles=debug. See https://docs.rs/env_logger/latest/env_logger/index.html#enabling-logging for more information.

使用 mbtiles <command> --help 查看特定命令的帮助。 mbtiles validate --help 示例:

Validate tile data if hash of tile data exists in file

Usage: mbtiles validate [OPTIONS] <FILE>

Arguments:
  <FILE>
          MBTiles file to validate

Options:
      --integrity-check <INTEGRITY_CHECK>
          Value to specify the extent of the SQLite integrity check performed

          [default: quick]
          [possible values: quick, full, off]

      --agg-hash <AGG_HASH>
          How should the aggregate tiles hash be checked or updated

          Possible values:
          - verify: Verify that the aggregate tiles hash value in the metadata table matches the computed value. Used by default
          - update: Update the aggregate tiles hash value in the metadata table
          - off:    Do not check the aggregate tiles hash value

  -h, --help
          Print help (see a summary with '-h')