Setconf is a small utility for changing settings in configuration textfiles.
It has no dependencies except the built-in Python modules.
Pull requests are welcome.
- It can be compiled to native with nuitka. Try these parameters:
--exe --lto --python-version=2.7
- A flag for changing the n'th occurence.
- A cleaner way to handle arguments, without adding an external dependency.
- A flag for commenting out keys (adding "# ")
- A flag for removing a value instead of using
''
. - A flag for removing both the key and the value.
- Rewrite in a different language?
- Optimize the code that is used for adding options with
-a
. - A way to add an option with
-a
after a given string occurs. - Test and fix the combination of
-a
and multiline markers. - Fix the behavior when
"
is the multiline marker and:
the delimiter (the yml format). - Document which assignment symbols and comment markers are supported.
- Refactor.
- Support both
#define
and%define
(ref asmttpd). - When changing settings in JSON files, a line may look like this:
"go.formatTool": "gofmt",
. Add a flag for being able to set the key and value without having to specify the quotes and the final comma.
- Apply fix for trailing newlines by @zappolowski (issue #16).
- Also test with Python 3.8.
- Add test cases.
- Allow uncommenting keys without providing a value.
- Update documentation.
- Can now uncomment configuration options with the
-u
flag. - Uncommenting and setting values also works on Linux kernel configuration (
#CONFIG_KERNEL_XY is not set
toCONFIG_KERNEL_XY=y
).
- Correctly formatted help text.
- Can change single-line
#define
values by using the-d
flag.
- Fixed an issue that only happened on Python 3.2.
- Several minor changes.
- Removed a dependency on chardet
- Fix issue #6, a failing testcase for
+=
.
- Deal mainly with bytes instead of strings.
- Handle ISO-8859-1 (Latin1) better, for Python 3.
- Can use floating point numbers together with
+=
and-=
- Fixed a problem with files without newline endings
- Can now use += or -= for increasing or decreasing integer values
- Better error messages when write permissions are denied
- Fixed a problem with -a that occurred when a key existed but was commented out
- Added regression test
- Now runs on Python 2 and Python 3 (tested with 2.4, 2.5, 2.6, 2.7 and 3.3)
- Fixed a problem with the -a option
- Creates the file when -a or --add is given, if needed
- Made -a add options only when not already present
- Made it compile with the latest version of shedskin
- Added an option -a for adding keys/values to a file
- Fixed a problem with ascii/utf-8 encoding
- Fixed a problem with => assignments
- Changed the way files are opened with open()
- Added more tests relating to ascii/utf-8
- Add support for => as well
- Fixed a bug where comments were not ignored for multiline values
- New logo
- Ignored configuration options that are commented out
- License: GPL2
- Author: Alexander F. Rødseth