From 04bedbef07ad260bf278a0a67ed9361db93313fb Mon Sep 17 00:00:00 2001 From: carm Date: Wed, 14 May 2025 04:24:56 +0800 Subject: [PATCH] style: Reformatted code with .editorconfig --- .editorconfig | 2 +- README.md | 255 ++++++-------------------------------------------- README_CN.md | 67 ++++--------- 3 files changed, 47 insertions(+), 277 deletions(-) diff --git a/.editorconfig b/.editorconfig index 3b8d0d7..aa67895 100644 --- a/.editorconfig +++ b/.editorconfig @@ -342,5 +342,5 @@ tab_width = 2 max_line_length = 120 [*.md] -max_line_length = 0 +max_line_length = 500 trim_trailing_whitespace = false diff --git a/README.md b/README.md index 425b067..afcc487 100644 --- a/README.md +++ b/README.md @@ -8,167 +8,46 @@ ![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/configured) ![](https://visitor-badge.glitch.me/badge?page_id=configured.readme) -README -LANGUAGES [ [ -* -*English -**](README.md) | [中文](README_CN.md) ] +README LANGUAGES [ [**English**](README.md) | [中文](README_CN.md) ] -# configured -_( -config -framework)_ +# configured _(config framework)_ logo -_ -* -*" -Once -set, -Simple -get." -**_ +_**"Once set, Simple get."**_ -A -simple, -easy-to-use -and -universal -solution -for -managing, -loading, -reading, -and -updating -configuration -files. +A simple, easy-to-use and universal solution for managing, loading, reading, +and updating configuration files. -Supported -* -*JSON -**, -* -*YAML -**, -* -*Hocon -**, -* -*TOML -**, -* -*SQL -**, -* -*MongoDB -**... -and -much -more! +Supported **JSON**, **YAML**, **Hocon**, **TOML**, **SQL**, **MongoDB**... and much more! ## Features & Advantages -Supported [YAML](providers/yaml), [JSON](providers/json), [HOCON](providers/hocon) -and [SQL](providers/sql) -based -configuration -files -format. +Supported [YAML](providers/yaml), [JSON](providers/json), [HOCON](providers/hocon) and [SQL](providers/sql) +based configuration files format. -- -Class-based -mechanism -for -initializing, -loading, -retrieving, -and -updating -configuration -files, -ensuring -convenience -and -efficiency. -- -Supports -manual -serialization -and -deserialization -of -complex -configurations. -- -Offers -multiple -builder -forms -for -rapid -construction -of -`ConfigValue` -objects. -- -Enables -specification -of -configuration -paths, -comments, -and -more -via -annotations. +- Class-based mechanism for initializing, loading, retrieving, and updating configuration files, ensuring convenience + and efficiency. +- Supports manual serialization and deserialization of complex configurations. +- Offers multiple builder forms for rapid construction of `ConfigValue` objects. +- Enables specification of configuration paths, comments, and more via annotations. ## Development -For -the -latest -JavaDoc -release, [CLICK HERE](https://CarmJos.github.io/configured). +For the latest JavaDoc release, [CLICK HERE](https://CarmJos.github.io/configured). -For -a -detailed -development -guide, [CLICK HERE](.doc/README.md). +For a detailed development guide, [CLICK HERE](.doc/README.md). ### Preview -To -quickly -demonstrate -the -applicability -of -the -project, -here -are -a -few -practical -demonstrations: +To quickly demonstrate the applicability of the project, here are a few practical demonstrations: - [Database configuration.](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java) -- [Demonstration of configuration instance classes.](demo/src/main/java/cc/carm/lib/configuration/demo/tests/conf/DemoConfiguration.java) +- [Demonstration of configurations instance classes.](demo/src/main/java/cc/carm/lib/configuration/demo/tests/conf/DemoConfiguration.java) -Check -out -all -code -demonstrations [HERE](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java). -For -more -examples, -see -the [Development Guide](.doc/README.md). +Check out all code demonstrations [HERE](demo/src/main/java/cc/carm/lib/configuration/demo/DatabaseConfiguration.java). +For more examples, see the [Development Guide](.doc/README.md). ```java @@ -361,104 +240,30 @@ dependencies { ## Derived Projects -### [ -* -*MineConfiguration -**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos) +### [**MineConfiguration**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos) -configured -for -MineCraft! -Easily -manage -configurations -on -MineCraft-related -server -platforms. +configured for MineCraft! +Easily manage configurations on MineCraft-related server platforms. -Currently, -it -supports -BungeeCord, -Velocity, -Bukkit ( -Spigot) -servers, -with -more -platforms -to -be -supported -soon. +Currently, it supports BungeeCord, Velocity, Bukkit (Spigot) servers, +with more platforms to be supported soon. ## Support and Donation -If -you -appreciate -this -plugin, -consider -supporting -me -with -a -donation! +If you appreciate this plugin, consider supporting me with a donation! -Thank -you -for -supporting -open-source -projects! +Thank you for supporting open-source projects! -Many -thanks -to -Jetbrains -for -kindly -providing -a -license -for -us -to -work -on -this -and -other -open-source -projects. +Many thanks to Jetbrains for kindly providing a license for us to work on this and other open-source projects. [![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/CarmJos/configured) -Many -thanks -to [ArtformGames](https://github.com/ArtformGames) -for -their -strong -support -and -active -contribution -to -this -project! +Many thanks to [ArtformGames](https://github.com/ArtformGames) for their +strong support and active contribution to this project! ArtformGames ## Open Source License -This -project's -source -code -is -licensed -under +This project's source code is licensed under the [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html). diff --git a/README_CN.md b/README_CN.md index b9fbac7..704dc09 100644 --- a/README_CN.md +++ b/README_CN.md @@ -8,48 +8,30 @@ ![CodeSize](https://img.shields.io/github/languages/code-size/CarmJos/configured) ![](https://visitor-badge.glitch.me/badge?page_id=configured.readme) -README -LANGUAGES [ [English](README.md) | [ -* -*中文 -**](README_CN.md) ] +README LANGUAGES [ [English](README.md) | [**中文**](README_CN.md) ] -# configured -_( -配置文件框架)_ +# configured _(配置文件框架)_ logo -* -*一次配置,轻松读取! -** +**一次配置,轻松读取!** 一款简单便捷的通用配置文件加载、读取与更新工具,可自定义配置的格式。 ## 特性 & 优势 -支持 [YAML](providers/yaml), [JSON](providers/gson), [HOCON](providers/hocon) -和 [SQL](providers/sql) -等多种配置文件格式。 +支持 [YAML](providers/yaml), [JSON](providers/gson), [HOCON](providers/hocon) 和 [SQL](providers/sql) 等多种配置文件格式。 -- -基于类的配置文件初始化、加载、获取与更新机制,方便快捷。 -- -支持复杂配置的手动序列化、反序列化。 -- -提供多种builder形式,快速构建 -`ConfigValue` -对象。 -- -支持通过注解规定配置对应的路径、注释等信息。 +- 基于类的配置文件初始化、加载、获取与更新机制,方便快捷。 +- 支持复杂配置的手动序列化、反序列化。 +- 提供多种builder形式,快速构建 `ConfigValue` 对象。 +- 支持通过注解规定配置对应的路径、注释等信息。 ## 开发 -详细开发介绍请 [点击这里](.doc/README.md) , -JavaDoc( -最新Release) +详细开发介绍请 [点击这里](.doc/README.md) , JavaDoc(最新Release) 请 [点击这里](https://CarmJos.github.io/configured) 。 ### 示例代码 @@ -278,25 +260,12 @@ dependencies { ## 衍生项目 -### [ -* -*MineConfiguration -**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos ) +### [**MineConfiguration**](https://github.com/CarmJos/MineConfiguration) (by @CarmJos ) -configured -for -MineCraft! -开始在 -MineCraft -相关服务器平台上轻松( -做) -配置吧! +configured for MineCraft! +开始在 MineCraft 相关服务器平台上轻松(做)配置吧! -目前支持 -BungeeCord, -Bukkit( -Spigot) -服务端,后续将支持更多平台。 +目前支持 BungeeCord, Bukkit(Spigot) 服务端,后续将支持更多平台。 ## 支持与捐赠 @@ -304,18 +273,14 @@ Spigot) 感谢您对开源项目的支持! -万分感谢 -Jetbrains -为我们提供了从事此项目和其他开源项目的许可! +万分感谢 Jetbrains 为我们提供了从事此项目和其他开源项目的许可! [![](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)](https://www.jetbrains.com/?from=https://github.com/CarmJos/configured) -万分感谢来自 [ArtformGames](https://github.com/ArtformGames) -对本项目的大力支持与积极贡献! +万分感谢来自 [ArtformGames](https://github.com/ArtformGames) 对本项目的大力支持与积极贡献! ArtformGames ## 开源协议 -本项目源码采用 [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html) -开源协议。 +本项目源码采用 [GNU LESSER GENERAL PUBLIC LICENSE](https://www.gnu.org/licenses/lgpl-3.0.html) 开源协议。