sphobjinv.cli.write
Module for sphobjinv
CLI Inventory
writing.
sphobjinv
is a toolkit for manipulation and inspection of
Sphinx objects.inv files.
- Author
Brian Skinn (brian.skinn@gmail.com)
- File Created
19 Nov 2020
- Copyright
(c) Brian Skinn 2016-2022
- Source Repository
- Documentation
- License
Code: MIT License
Docs & Docstrings: CC BY 4.0 International License
See LICENSE.txt for full license terms.
Members
- write_file(inv, in_path, params)
Write the inventory contents to a file on disk.
- Parameters
- Raises
ValueError – If both params[“expand”] and params[“contract”] are
True
- write_json(inv, path, params)
Write an
Inventory
to JSON.Writes output via
fileops.writejson()
.Calling with both expand and contract as
True
is invalid.- Parameters
- Raises
ValueError – If both params[“expand”] and params[“contract”] are
True
- write_plaintext(inv, path, *, expand=False, contract=False)
Write an
Inventory
to plaintext.Newlines are inserted in an OS-aware manner, based on the value of
os.linesep
.Calling with both expand and contract as
True
is invalid.- Parameters
- Raises
ValueError – If both expand and contract are
True
- write_stdout(inv, params)
Write the inventory contents to stdout.
- Parameters
inv –
Inventory
– Objects inventory to be written to stdoutparams – dict – argparse parameters
- Raises
ValueError – If both params[“expand”] and params[“contract”] are
True
- write_zlib(inv, path, *, expand=False, contract=False)
Write an
Inventory
to zlib-compressed format.Calling with both expand and contract as
True
is invalid.- Parameters
- Raises
ValueError – If both expand and contract are
True