From 070d9a77b315ef1dff47b03960bd640809623fdf Mon Sep 17 00:00:00 2001 From: Brandon Liu Date: Wed, 17 Feb 2021 12:18:19 +0800 Subject: [PATCH] add pmtiles-show --- python/bin/pmtiles-show | 15 +++++++++++++++ 1 file changed, 15 insertions(+) mode change 100644 => 100755 python/bin/pmtiles-show diff --git a/python/bin/pmtiles-show b/python/bin/pmtiles-show old mode 100644 new mode 100755 index e69de29..f92c5b5 --- a/python/bin/pmtiles-show +++ b/python/bin/pmtiles-show @@ -0,0 +1,15 @@ +#!/usr/bin/env python + +import sys +from pmtiles.reader import read + +if len(sys.argv) <= 1: + print("Usage: pmtiles-show PMTILES_FILE") + exit(1) + +with read(sys.argv[1]) as reader: + print('spec version: ',reader.version) + print('metadata:') + for k, v in reader.metadata.items(): + print(k,'=',v) + print('root entries:', reader.root_entries)