Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ddiidev/ini-v
Simple and practical module for manipulating ini/cfg file.
https://github.com/Ddiidev/ini-v
cfg-parser deserialize ini-parser serialize
Last synced: 3 months ago
JSON representation
Simple and practical module for manipulating ini/cfg file.
- Host: GitHub
- URL: https://github.com/Ddiidev/ini-v
- Owner: Ddiidev
- License: mit
- Created: 2022-08-15T15:54:07.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-31T03:58:15.000Z (9 months ago)
- Last Synced: 2024-05-19T05:27:11.436Z (6 months ago)
- Topics: cfg-parser, deserialize, ini-parser, serialize
- Language: V
- Homepage: https://Ddiidev.github.io/ini-v/
- Size: 15.6 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - ini-v - Simple and practical module for manipulating ini/cfg file. (Applications / Serialization)
README
# Ini
Simple and practical module for manipulating ini/cfg file.
## Documentation
You can access the documentation [here](https://Ddiidev.github.io/ini-v/).
## Install
```bash
v install Ddiidev.ini
```Or
```bash
v install https://github.com/Ddiidev/ini-v
```
## Usage```v
import ldedev.ini // or "import ini" depends on how it was installed.struct Keys {
pub:
peoples struct {
p1 string
p2 string
}
ages struct {
a1 int
a2 int
}
}const s = r'[peoples]
p1=André
p2=Luiz
[ages]
a1=26
a2=29
'fn main() {
k := ini.reader_to[Keys](s)!dump(k)
}
```result:
```
[.\\teste.v:26] k: Keys{
peoples: struct {
p1: 'André'
p2: 'Luiz'
}
ages: struct {
a1: 26
a2: 29
}
}
```## Functionalities
- "read_ini" to map
- "serrialize" to string
- "write_ini" to file ini
- "deserialize" string to file ini
- "reader_to[T]" file/content for type T_It is still not possible to write a T object to the ini file._
## Licença
[MIT](https://choosealicense.com/licenses/mit/)