https://github.com/aj-rom/confile
Converts any file into a quarriable object. Supports: YAML and more to come.
https://github.com/aj-rom/confile
files java maven oop yaml
Last synced: about 2 months ago
JSON representation
Converts any file into a quarriable object. Supports: YAML and more to come.
- Host: GitHub
- URL: https://github.com/aj-rom/confile
- Owner: aj-rom
- License: apache-2.0
- Created: 2021-01-16T23:18:09.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-12-14T20:50:34.000Z (over 3 years ago)
- Last Synced: 2025-06-21T10:41:57.508Z (about 1 year ago)
- Topics: files, java, maven, oop, yaml
- Language: Java
- Homepage: https://confile.coachluck.io
- Size: 85.9 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Confile ( CURRENTLY IN ALPHA )
A Java library that converts any .yml file into a quarriable (FileConfiguration) object. Specifically focused on getting and setting strings of a key/value pair.
Doumenation can be found at my website [here](https://confile.coachluck.io).
**Currently Supported Types**:
- [X] YAML
- [ ] TXT
## Motivation
I wanted to make this publically accessible because I have found it very useful to be able to easily convert files into objects within Java. This also is the core for my project TransFile, that is underdevelopment focusing on translating any nested structured file while maintaing key, value structure.
## Code Style & Status
  
Conform to the code style by Google found [here](https://google.github.io/styleguide/javaguide.html)
## Frameworks used
Lombok for simpilized getter/setter methods, and SnakeYaml for reading and writing from Yaml files.
- [Lombok](https://projectlombok.org/)
- [SnakeYaml](https://mvnrepository.com/artifact/org.yaml/snakeyaml)
## Features
Under construction...
## API Usage
Documentation can be found [here](confile.coachlucl.io)
```Java
// Easily create a new YamlConfiguration from any file
File yamlFile = new File("some-yaml.yml")
// Then its as easy as loading it into a YamlConfiguration as this
YamlConfiguration yamlConfig = YamlConfiguration.load(yamlFile)
// Now you can view/change keys and their values
yamlConfig.getString("Hello") // should get the string value at the 'Hello' key of the yaml file if non existang it will be null
// You can also set new keys and values or replace existing ones
yamlConfig.set("Hello", "Hello World!)
// To then save the changes to our file we could call or not if you would like to maintain file integrity.
yamlConfig.save(yamlFile)
```
### Get with Maven
#### Setting up the repository
Copy and paste the following into your **pom.xml** file.
```XML
Confile
https://repo.coachluck.io/Confile/
true
always
```
#### Choosing a project
Based off of your needs you can get any of the projects individually.
```XML
io.coachluck
yaml-config
1.0-SNAPSHOT
io.coachluck
file-config
1.0-SNAPSHOT
```
## Tests
Under construction
## Contribute
Under construction
## License
This project is licensed under the Apache License v2.0. Check out the [LICENSE](https://github.com/CoachLuck/Confile/blob/main/LICENSE) for more information.
Apache License v2.0 © [A.J. Romaniello](https://github.com/CoachLuck)