.. Description of commandline usage Command-Line Usage ================== The primary CLI for |soi| is implemented using two subcommands of the ``sphobjinv`` entrypoint: - ``sphobjinv convert`` (:doc:`docs page `), which handles conversion of inventories between supported formats (currently zlib-compressed, plaintext, and JSON). - ``sphobjinv suggest`` (:doc:`docs page `), which provides suggestions for objects in an inventory matching a desired search term. As of v2.4, |soi| also provides an auxiliary entrypoint, ``sphobjinv-textconv`` (:doc:`docs page `), which takes one required argument: a path to a file on disk. This entrypoint attempts to instantiate an |Inventory| with this file and emit its plaintext contents to |stdout| with no cosmetic whitespace. The following two invocations are thus nearly synonymous:: $ sphobjinv convert plain path/to/objects.inv - $ sphobjinv-textconv path/to/objects.inv (Be sure to note the final hyphen in the first command.) The ``sphobjinv-textconv`` spelling is less awkward when configuring a Git |textconv| to allow rendering diffs of |objects.inv| files in plaintext. See the ``sphobjinv-textconv`` :doc:`entrypoint documentation ` for more information. ---- Shell examples in the CLI docs execute from within |cour|\ /tests/resource\ |/cour| unless indicated otherwise. For Python examples: * Examples are executed in a sandboxed directory pre-loaded with |cour|\ objects_attrs.inv\ |/cour| (from, e.g., `here `__). * :class:`~pathlib.Path` (from :mod:`pathlib`) is imported into the namespace before all tests. * |cour|\ cli_run\ |/cour| is a helper function that enables doctesting of CLI examples by mimicking execution of a shell command. It is described in more detail `here `__. * |cour|\ file_head\ |/cour| is a helper function that retrieves the head of a specified file. .. toctree:: :maxdepth: 1 :hidden: sphobjinv convert sphobjinv suggest sphobjinv-textconv