dbxml2rst.helper module¶
dbxml2rst.helpers¶
Some helpers, used by the dbxml2rst library
copyright: | Copyright (C) 2017 Markus Heiser |
---|---|
license: | GPL V3.0, see LICENSE for details. |
-
class
dbxml2rst.helper.
CLI
(*args, **kwargs)[source]¶ Bases:
object
A comfortable commandline.
-
autocomplete
()[source]¶ bash completion
To get in use of bash completion, install
argcomplete
:pip install argcomplete
and add the following to your ~/.bashrc:
function _py_argcomplete() { local IFS=$(echo -e '\v') COMPREPLY=( $(IFS="$IFS" \ COMP_LINE="$COMP_LINE" \ COMP_POINT="$COMP_POINT" \ _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \ _ARGCOMPLETE=1 \ "$1" 8>&1 9>&2 1>/dev/null) ) if [[ $? != 0 ]]; then unset COMPREPLY fi } complete -o nospace -o default -F _py_argcomplete myCommandName
-
-
class
dbxml2rst.helper.
EntityContainer
(fname, *args, **kwargs)[source]¶ Bases:
dbxml2rst.helper.PContainer
Variant of PContainer used by the dbxml2rst for xml-entities.
-
class
dbxml2rst.helper.
PContainer
(fname, *args, **kwargs)[source]¶ Bases:
dbxml2rst.helper.Container
Persistent container class.
The persistence is a json dump in the file given by constructor’s argument
fname
. It serialize only properties (objects) which are covered by thejson.dump
.