sphobjinv.cli.paths
sphobjinv
CLI path resolution module.
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
- resolve_inpath(in_path)
Resolve the input file, handling invalid values.
Currently, only checks for existence and not-directory.
- Parameters
in_path –
str
– Path to desired input file- Returns
abs_path –
str
– Absolute path to indicated file- Raises
FileNotFoundError – If a file is not found at the given path
- resolve_outpath(out_path, in_path, params)
Resolve the output location, handling mode-specific defaults.
If the output path or basename are not specified, they are taken as the same as the input file. If the extension is unspecified, it is taken as the appropriate mode-specific value from
DEF_OUT_EXT
.If
URL
is passed, the input directory is taken to beos.getcwd()
and the input basename is taken asDEF_BASENAME
.- Parameters
- Returns
out_path –
str
– Absolute path to the target output file