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!

To-Do list

  • Support CDATA in TD tags
  • Use the iterator to implement streaming transformations between DATATABLE/BINARY/BINARY2.
  • Also implement streaming conversion to CSV

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', 'xml-td', 'xml-bin', 'xml-bin2', '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
  -V, --version        Print version

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.3.0.tar.gz (121.7 kB view details)

Uploaded Source

Built Distributions

votable_cli-0.3.0-py3-none-win_amd64.whl (2.0 MB view details)

Uploaded Python 3 Windows x86-64

votable_cli-0.3.0-py3-none-manylinux_2_28_x86_64.whl (2.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ x86-64

votable_cli-0.3.0-py3-none-manylinux_2_28_aarch64.whl (1.9 MB view details)

Uploaded Python 3 manylinux: glibc 2.28+ ARM64

votable_cli-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ x86-64

votable_cli-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (2.1 MB view details)

Uploaded Python 3 manylinux: glibc 2.17+ i686

votable_cli-0.3.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (3.7 MB view details)

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

File details

Details for the file votable_cli-0.3.0.tar.gz.

File metadata

  • Download URL: votable_cli-0.3.0.tar.gz
  • Upload date:
  • Size: 121.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for votable_cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a49802a122fbc8dc4aa3b6e60243e256a9096dfcdbb97e3866841a56933503c0
MD5 2625b065ab3660c87203f208bc114a35
BLAKE2b-256 dd457ba8444fcf888d9c86d9d53baf93696c443f35a1bfb6f1878adc7b18fe20

See more details on using hashes here.

File details

Details for the file votable_cli-0.3.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 46edff78d510115f1c3d8130106615f0ab8afd2038aa5bd026e79fc6bdbb0b03
MD5 6bf6775579ec6d0a7646fbc3f58251cf
BLAKE2b-256 5fe164b8e4a4de32173d0331e01adbcbd79e6d5496c6863570270d9fd716c7b6

See more details on using hashes here.

File details

Details for the file votable_cli-0.3.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d1b31a56fa217ad8184e90b4f34fc7ce42c5b71504f0d5ec44338770ff52a8a4
MD5 45ea741a27f4da23182fb161064b5943
BLAKE2b-256 131559de3fae32cf45878d53788baea5d0072dcf9b81fa4ce56e94efe651770d

See more details on using hashes here.

File details

Details for the file votable_cli-0.3.0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 42710e3e211cf5452923402e858925cf0d736a5324f6b4597b44e4d4d0e72fdf
MD5 cf2a268b663410264ddac00ead865799
BLAKE2b-256 b33f35897ff07769ba75dba6f8759ba8ef7a0ee0558c67e9a36ec7673d7e00e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bf4c9f1be03f7944fef338916d4d1c6afbe8eb9bf24a5317d4984de68f9bb4a5
MD5 f5436027cf537666f2c0b84aec4e3664
BLAKE2b-256 c8abe532f97c1eee7f1204c87e233863ae2517aafa2404f09acb4e002ab0ef87

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 35e75cb8ca0c7fc2e5eb63612f354f2a319d0d3e8c876613a303448d4fc89dcf
MD5 c981b2153e876e928723cc0efdeceb4c
BLAKE2b-256 1ef476065eb6340a388e2156a992de8ef595774798005554bdc9bc75ab8be127

See more details on using hashes here.

File details

Details for the file votable_cli-0.3.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for votable_cli-0.3.0-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 a92f68afe7a0f1973b2ca1d3f32f745251f12a01a4141f08c8195888360afe51
MD5 a95c6ea85a4d393324b4c2b4646a0a44
BLAKE2b-256 9bbaffb84be6c87256b8a4c57d3287b65108017f0a4de97d397540515b907fe1

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