+
Skip to content

aj-rom/Confile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Currently Supported Types:

  • 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

Codacy Badge Issues Badge License

Conform to the code style by Google found here

Frameworks used

Lombok for simpilized getter/setter methods, and SnakeYaml for reading and writing from Yaml files.

Features

Under construction...

API Usage

Documentation can be found here

// 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.

<repositories>

    <!-- Confile Repository -->
    <repository>
        <id>Confile</id>
        <url>https://repo.coachluck.io/Confile/</url>
        <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
        </snapshots>
    </repository>

</repositories>

Choosing a project

Based off of your needs you can get any of the projects individually.

<dependencies>

    <!-- YAML Configuration -->
    <dependency>
        <groupId>io.coachluck</groupId>
        <artifactId>yaml-config</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
    
    <!-- OPTIONAL: FileConfiguration Core -->
    <dependency>
        <groupId>io.coachluck</groupId>
        <artifactId>file-config</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
    
</dependencies>

Tests

Under construction

Contribute

Under construction

License

This project is licensed under the Apache License v2.0. Check out the LICENSE for more information.

Apache License v2.0 © A.J. Romaniello

About

Converts any file into a quarriable object. Supports: YAML and more to come.

Topics

Resources

License

Stars

Watchers

Forks

Languages

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载