ksconf package¶
Subpackages¶
- ksconf.commands package
- Submodules
- ksconf.commands.check module
- ksconf.commands.combine module
- ksconf.commands.diff module
- ksconf.commands.filter module
- ksconf.commands.merge module
- ksconf.commands.minimize module
- ksconf.commands.promote module
- ksconf.commands.restexport module
- ksconf.commands.snapshot module
- ksconf.commands.sort module
- ksconf.commands.unarchive module
- Module contents
- ksconf.conf package
- ksconf.util package
- ksconf.vc package
Submodules¶
ksconf.archive module¶
-
ksconf.archive.
GenArchFile
¶ alias of
ksconf.archive.GenericArchiveEntry
-
ksconf.archive.
extract_archive
(archive_name, extract_filter=None)¶
-
ksconf.archive.
gaf_filter_name_like
(pattern)¶
-
ksconf.archive.
gen_arch_file_remapper
(iterable, mapping)¶
-
ksconf.archive.
sanity_checker
(interable)¶
ksconf.consts module¶
ksconf.setup_entrypoints module¶
Defines all command prompt entry points for CLI actions
This is a silly hack that serves 2 purposes:
- It works around and apparent Python 3.4/3.5 bug on Windows where [options.entry_point] in setup.cfg is ignored hence ‘ksconf’ isn’t installed as a console script and custom ksconf_* entry points are not available. (So no CLI commands are available)
- It allows for fallback mechanism when
- running unit tests (can happen before install)
- if entrypoints or pkg_resources are not available at run time (Splunk’s embedded python)
-
class
ksconf.setup_entrypoints.
Ep
(name, module_name, object_name)¶ Bases:
tuple
-
module_name
¶ Alias for field number 1
-
name
¶ Alias for field number 0
-
object_name
¶ Alias for field number 2
-
-
class
ksconf.setup_entrypoints.
LocalEntryPoint
(data)¶ Bases:
object
Bare minimum standin for entrypoints.EntryPoint
-
load
()¶
-
-
ksconf.setup_entrypoints.
get_entrypoints_fallback
(group)¶
-
ksconf.setup_entrypoints.
get_entrypoints_setup
()¶
Module contents¶
ksconf - Kintyre Splunk CONFig tool
Design goals:
- Multi-purpose go-to .conf tool.
- Dependability
- Simplicity
- No eternal dependencies (single source file, if possible; or packable as single file.)
- Stable CLI
- Good scripting interface for deployment scripts and/or git hooks
Git configuration tweaks
Setup ksconf as an external difftool provider:
~/.gitconfig:
- [difftool “ksconf”]
- cmd = “ksconf –force-color diff “$LOCAL” “$REMOTE” | less -R”
- [difftool]
- prompt = false
- [alias]
- ksdiff = “difftool –tool=ksconf”
Now can run: git ksdiff props.conf Test command: git config diff.conf.xfuncname
Make normal diffs show the ‘stanza’ on the @@ output lines