Command-line to convert IVOA VOTables in XML, JSON, YAML and TOML
Project description
votable-cli
or VOTCli
A command-line to read and convert VOTables from/to XML, JSON, TOML and YAML.
Status
The library this CLI is based on is in an early stage of development. We are (reasonably) open to changes in the various format, e.g.:
- we could flag attributes with a '@' prefix
- we could use upper case elements tag names
- we could remove the 's' suffix in elements arrays
- we could change the
pos_infos
name for something else - ...
More testing is required, especially the bit type and arrays. Please, provide us with VOTable examples!
Install
From pypi for python users
VOTable cli is available in pypi,
you can thus install the vot
executable using pip
:
pip install votable-cli
vot --help
Debian package
Download the last votable-cli_vxx_yyy.deb
corresponding to your architecture
(x86_64_musl
has the most chances to fit your needs)
from the github release page.
Install the .deb
by clicking on it or using the command line:
sudo dpkg -i votable-cli_vxx_yyy.deb
sudo apt-get install -f
Then you can use the tool:
vot
man vot
You can uninstall using, e.g.:
sudo dpkg -r $(dpkg -f votable-cli_vxx_yyy.deb Package)
Pre-compile binaries for MacOS, Linux and Windows
Download the last vot-vxx_yyy.tar.gz
corresponding to your architecture
from the github release page.
You probably want ot use:
- Linux:
vot-vxx-x86_64-unknown-linux-musl.tar.gz
- MacOS:
vot-vxx-x86_64-apple-darwin.tar.gz
- Windows:
vot-vxx-.zip
WARNING: for linux, use musl
instead of gnu
(high chances of uncompatibility in the latter case)
The tar contains a single executable binary file.
tar xzvf vot-vxx-yyy.tar.gz
./vot
Compile from source code
Install rust
(and check that ~/.cargo/bin/
is in your path),
or update the Rust compiler with:
rustup update
Clone the votable lib rust project:
git clone https://github.com/cds-astro/cds-votable-rust
Install from using cargo
:
cargo install --path crates/cli
Help message
> vot --help
Command-line to convert IVOA VOTables in XML, JSON, YAML and TOML.
Usage: vot [OPTIONS] <INPUT_FMT> <OUTPUT_FMT>
Arguments:
<INPUT_FMT> Format of the input document ('xml', 'json', 'yaml' or 'toml')
<OUTPUT_FMT> Format of the output document ('xml', 'json', 'yaml' or 'toml')
Options:
-i, --input <FILE> Input file (else read from stdin)
-o, --output <FILE> Output file (else write to stdout)
-p, --pretty Pretty print (for JSON and TOML)
-h, --help Print help information
-V, --version Print version information
Example
> time vot xml xml -i VII.vot > xml.1.vot
real 0m0,009s
user 0m0,001s
sys 0m0,009s
> time vot xml toml --pretty -i VII.vot | vot toml json | vot json xml > xml.2.vot
real 0m0,022s
user 0m0,018s
sys 0m0,012s
> diff xml.1.vot xml.2.vot
License
Like most projects in Rust, this project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file votable_cli-0.2.0.tar.gz
.
File metadata
- Download URL: votable_cli-0.2.0.tar.gz
- Upload date:
- Size: 76.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35f6b29a74199f45907f4bd4e900178f1de3ae3c6addd13e1a85712955a6eaea |
|
MD5 | 6f4c9191057a46e913f0004de2289115 |
|
BLAKE2b-256 | 104617cdc7848c7ee75c3e2a3c1f19f85f6d3707acc7265fe8772e59282ac54d |
File details
Details for the file votable_cli-0.2.0-py3-none-win_amd64.whl
.
File metadata
- Download URL: votable_cli-0.2.0-py3-none-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 186c99b8814cb47726ad9be0f2d4e32361045ac6fd59b544c89ebdab8ec51498 |
|
MD5 | 86fd9d17d7d3df0294a90a65321e00ca |
|
BLAKE2b-256 | 0f1aac300f199361b3fe07c6e05cb37258c029f5344585b7a2d5b2e00f4a7552 |
File details
Details for the file votable_cli-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: votable_cli-0.2.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd3b81d3dff5a9a0aa026c8928c3975c9d3095ab6ff1e20253d2dc64842e50d8 |
|
MD5 | 247dd8531f19a354e74ff6bbd4bf6567 |
|
BLAKE2b-256 | 3aabe9d297ff06176ff372a1e127b02fc9c69e5b8acc12849600b6c7b482b29f |
File details
Details for the file votable_cli-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
.
File metadata
- Download URL: votable_cli-0.2.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, manylinux: glibc 2.17+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe612d9f37b72a21f6149190f7e8056c4293b082fb4fc40dd3f8b3b05472c0a0 |
|
MD5 | 17c5c378c307d9858cc8b5bc1a1de0b7 |
|
BLAKE2b-256 | 0d365061ecd5a01d238ade1104d06356a41acce257a3ac5926bbdb599144ec8f |
File details
Details for the file votable_cli-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: votable_cli-0.2.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fa52d7cefb6663bcbc85322ede0ded8943821d4990a30f98ae25c16c0c784b6 |
|
MD5 | fee8612e3ec205920c0296c1003e2dec |
|
BLAKE2b-256 | c83dcb59fdeccf4a5c0eab9f5dec0f0a23c1a2fd58768024e353c4cfdd2e4b76 |
File details
Details for the file votable_cli-0.2.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: votable_cli-0.2.0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 2.3 MB
- Tags: Python 3, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0d29114de431412f48d75688fa017e088a9f656e603326489a4553cfa6c3167 |
|
MD5 | 713e2f5f7c1162eab3e09a68abc39a58 |
|
BLAKE2b-256 | 3ea3b17262f8b04f51894df21f5949a6367f606ff0ffe348dd31d7a171673e29 |