Scripts for working with terriajs catalog files.
python3 -m pip install git+https://github.com/ykiu/terriajs-scripts.git
Decodes a share URL into JSON. Reads from stdin and writes to stdout.
example:
$ echo https://pss-terria.com/#share=s-RBfZnezRe4XWXspi | tjs share decode
{"initSources": {...}}
options:
-h, --help show this help message and exit
Encodes a catalog item/init source/share data into a URL. Reads from stdin and writes to stdout.
example:
$ cat item.json
{"type": "3d-tiles", "name": "test", "url": "https://example.com/tileset.json"}
$ cat item.json | tjs share encode --base-url=https://pss-terria.com
https://pss-terria.com#start=%7B%22initSources%22%3A%5B%7B%22stratum%22%3A%...
options:
-h, --help show this help message and exit
--base-url BASE_URL The URL onto which to attach the share fragment. e.g. https://pss-terria.com
Gzipping directory contents.
example:
$ tjs gzip path/to/source/directory path/to/destination/directory
positional arguments:
source The source directory.
destination The destination directory.
options:
-h, --help show this help message and exit
Running the command without building & installing:
python3 -m terriajsscripts.main