Git Product home page Git Product logo

chatson's Introduction

chatson

Build Status codecov License

Using

Get started using Chatson

Chatson.toJson(chatson);
Chatson.toTextComponent(chatson);

Warning do not use other chatson project classes as those are subject to change and the version will not bump.

Setting up as a dependency

Gradle

repositories {
     maven { url 'https://jitpack.io' }
}
compile 'com.github.clubobsidian:chatson:1.0.0'

Maven

<repositories>
	<repository>
		<id>jitpack.io</id>
		<url>https://jitpack.io</url>
	</repository>
</repositories>

<dependency>
	<groupId>com.github.clubobsidian</groupId>
	<artifactId>chatson</artifactId>
	<version>1.0.0</version>
</dependency>

Dependencies

Development

Eclipse

  1. Git clone the project
  2. Generate eclipse files with gradlew eclipse
  3. Import project

Intellij

  1. Git clone the project
  2. Generate intellij files with gradlew idea
  3. Import project

Building

gradlew shadowJar

chatson's People

Contributors

virustotalop avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

chatson's Issues

Handle decoration before color

This can probably be done by checking if the next token is a color and then skipping. This shouldn't cause any known issues.

Support for books?

It would be useful to add support for books so we can have interactive books for help menus or anything else.

chatson specifications

Since chatson really should be rewritten due to the unclear requirements in the beginning I wanted to make an issue to document all the behaviors that need to be handled.

  • Color and text
    • &ctest
  • Multiple colors with multiple text components
    • &ctest1&btest2&atest3
  • Text decoration
    • &ltest
  • Multiple text decorations
    • &o&ltest
  • Color and text decoration
    • &c&ltest
  • Decoration before color
    • &l&ctest
    • This fail and just show the color
  • Dangling text decoration
    • test&l
    • Bold would not apply
  • Text decoration after a color
    • &aHello &lWorld
    • The 'Hello' should be green and the 'World' should be green & bold
  • Text parser and hover color
    • &c&ltest&h&atest1&btest2
    • The text 'test' that is hovered over should be red and bold and have a hover component that is green with the text 'test1' and light blue text 'test2'.
  • Decoration before color in a text component
    • c&ltest&h&l&ctest1
    • Decoration should be removed
  • Dangling decorator in hover
    • &c&ltest&h&ctest1&l
    • Decoration should be removed
  • Decoration in hover
    • &c&ltest&h&ltest1
  • Color should persist in the hover as well on decoration
    • &c&ltest&h&atest1&ltest2
  • Hover should be able to reset
    • test&htest1&r reset
  • Have hover reset on other special decoration
    • &a/mb accept&h&bClick me to run the command!&q/mb accept&r&7 - &fAccepts an invite
  • Run commands
    • test&q/help
  • Suggest command
    • test2&w/help
  • Open url
    • github&uhttps://www.github.com
  • Change book pages
    • Go to page 3&p3

Make code dry

There is quite a bit of code duplication due to the hover event, we should try to restructure the code to make it so we do not have to duplicate code in order to correctly handle the hover event.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.