diff --git a/README.rst b/README.rst index 6fd5508..6fcdfb9 100644 --- a/README.rst +++ b/README.rst @@ -114,13 +114,14 @@ the ``xq --xml-output``/``xq -x`` option. Multiple XML documents can be passed i ``xq a.xml b.xml``. Use ``--xml-item-depth`` to descend into large documents, streaming their contents without loading the full doc into memory (for example, stream a `Wikipedia database dump `_ with ``cat enwiki-*.xml.bz2 | bunzip2 | xq . --xml-item-depth=2``). Entity expansion and DTD resolution is disabled to avoid -XML parsing vulnerabilities. +XML parsing vulnerabilities. Use ``python -m yq.xq`` if you want to ensure a specific Python runtime. TOML support ------------ ``yq`` supports `TOML `_ as well. The ``yq`` package installs an executable, ``tomlq``, which uses the `tomlkit library `_ to transcode TOML to JSON, then pipes it to ``jq``. Roundtrip -transcoding is available with the ``tomlq --toml-output``/``tomlq -t`` option. +transcoding is available with the ``tomlq --toml-output``/``tomlq -t`` option. Use ``python -m yq.tomlq`` if you want to +ensure a specific Python runtime. .. admonition:: Compatibility note diff --git a/yq/tomlq/__init__.py b/yq/tomlq/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/yq/tomlq/__main__.py b/yq/tomlq/__main__.py new file mode 100644 index 0000000..2296350 --- /dev/null +++ b/yq/tomlq/__main__.py @@ -0,0 +1,4 @@ +from .. import tq_cli + +if __name__ == "__main__": + tq_cli() diff --git a/yq/xq/__init__.py b/yq/xq/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/yq/xq/__main__.py b/yq/xq/__main__.py new file mode 100644 index 0000000..e2b6d34 --- /dev/null +++ b/yq/xq/__main__.py @@ -0,0 +1,4 @@ +from .. import xq_cli + +if __name__ == "__main__": + xq_cli()