complete README.md

This commit is contained in:
cclecle
2022-06-05 03:19:48 +02:00
parent 65425586ae
commit a3874eb016

View File

@@ -1,5 +1,56 @@
# ChaCha-INI
Yet another INI parser / generator.
special feature: ability to handle multiple key / section instance.
***Yet another python INI parser / generator !***
This one aim to be simple and initilaly target Unreal Tournament Series config files, but should work well for other usages.
# key features:
- handling multiple Sections instance with same name
- handling multiple Keys instance with same name in the same section, using filters
- generate output INI with or without spaces around '='
- strict mode: detect missformed INI files
- blank lines and comments are kept
# Limitations:
- Comments and blank lines can only be add in order
- Multiple sections with same name are supported for existing files but can not be added by API
# Installation
**From main repository:**
python3 -m pip install git+https://chacha.ddns.net/gitea/chacha/ChaChaSimpleINI
**From PIP:**
TODO :-/
# Usage
**Input INI:**
[section1]
key1=12
**code:**
from ChaChaSimpleINI import *
MyINI = ChaChaSimpleINI("~/myINI.ini")
key1 = MyINI.getKeyValue("section1","key1")
print(key1) # will output 12
MyINI.setAddKeyValue("section1","key2",42)
MyINI.write(False)
**Output INI:**
[section1]
key1=12
key2=42
To see more examples, refer to the included unittest code.
# Copyright
ChaChaSimpleINI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Unported License.
You should have received a copy of the license along with this work. If not, see <https://creativecommons.org/licenses/by-nc-sa/4.0/>.