Skip to main content

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

votable_cli-0.1.1a0.tar.gz (66.3 kB view details)

Uploaded Source

Built Distributions

votable_cli-0.1.1a0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3 Windows x86-64

votable_cli-0.1.1a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

votable_cli-0.1.1a0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

votable_cli-0.1.1a0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (2.2 MB view details)

Uploaded Python 3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

votable_cli-0.1.1a0-py3-none-macosx_10_7_x86_64.whl (1.2 MB view details)

Uploaded Python 3 macOS 10.7+ x86-64

File details

Details for the file votable_cli-0.1.1a0.tar.gz.

File metadata

  • Download URL: votable_cli-0.1.1a0.tar.gz
  • Upload date:
  • Size: 66.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.13.6

File hashes

Hashes for votable_cli-0.1.1a0.tar.gz
Algorithm Hash digest
SHA256 3d6d9d63004201a6a6c696bea889a09517d3a388369076694a2977d9d854f944
MD5 d51451529c8c392cace8be4c689d7182
BLAKE2b-256 e36940952daf872e019156b393ae967105ec31a0f6a25884c06e84162b46475f

See more details on using hashes here.

File details

Details for the file votable_cli-0.1.1a0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for votable_cli-0.1.1a0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 ecc5ed054364c16f885d1ec94c7bb6f4871fd3078b5d98558c187a926bfcfb07
MD5 487e71f8c1ba295db6bf7ecf941d0a2d
BLAKE2b-256 8a340de5146e141c38eccfa69fd11bebc818964cfe25237a98a4b1a1ab3fc734

See more details on using hashes here.

File details

Details for the file votable_cli-0.1.1a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for votable_cli-0.1.1a0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 70cf1348e6b37919f9216763254da1de5ae54191d096ef4921e143095faf4ae8
MD5 69f77ec33a66cea7840190e8b00e0e1f
BLAKE2b-256 07e7bd0725e1162379f2def5b86ff6afaabc20255496d9136182df0d177ab574

See more details on using hashes here.

File details

Details for the file votable_cli-0.1.1a0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for votable_cli-0.1.1a0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7b9b27e20e279b8e0265fa76e62952bf16bfd689328d2e9b294f62413adb6bb5
MD5 90fbfdf908798ef0ce0ef191c6ddbc3e
BLAKE2b-256 231542dc0a83952f78453d2a38263cee356d08c0a3297f4ab137d5bc9b4d7b5e

See more details on using hashes here.

File details

Details for the file votable_cli-0.1.1a0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for votable_cli-0.1.1a0-py3-none-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b0efa355f742c6b09f6df135633a249a53fa85784ae8149085a5f6f0042e00ec
MD5 6d8184e0eee33cbcb5e90df29b0ec83c
BLAKE2b-256 aae8d79e4a1634338e04e283f0a74d5fe92e381899acb0c358b0ba27667cd47b

See more details on using hashes here.

File details

Details for the file votable_cli-0.1.1a0-py3-none-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for votable_cli-0.1.1a0-py3-none-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1371560eacec6d8956a8ca32e936127e890bd5b17fc1591792c8023881d2f0fd
MD5 4f047caa28fe7567d03bc2e2c229a262
BLAKE2b-256 d8035d33c5b250393f31c7a1239d00c120f5bc3736d6e28c70d242a94f270cbf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page