mirror of
https://github.com/jwdeveloper/TikTokLiveJava.git
synced 2026-02-27 16:59:39 -05:00
Simplify adding events to TikTok Builder,
checkout `EventsBuilder`
This commit is contained in:
@@ -23,10 +23,16 @@
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.13.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.github.jwdeveloper.Descrabble</groupId>
|
||||
<artifactId>Descrabble-Full</artifactId>
|
||||
<version>0.0.7-Release</version>
|
||||
<version>0.0.11-Release</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package io.github.jwdeveloper.tiktok;
|
||||
|
||||
import io.github.jwdeveloper.descrabble.api.DescriptionDecorator;
|
||||
import io.github.jwdeveloper.descrabble.api.elements.Element;
|
||||
import io.github.jwdeveloper.descrabble.api.elements.ElementFactory;
|
||||
|
||||
public class EventsDecorator implements DescriptionDecorator {
|
||||
@Override
|
||||
public void decorate(Element root, ElementFactory factory) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package io.github.jwdeveloper.tiktok;
|
||||
|
||||
import io.github.jwdeveloper.descrabble.api.DescriptionGenerator;
|
||||
import io.github.jwdeveloper.descrabble.framework.Descrabble;
|
||||
import io.github.jwdeveloper.descrabble.plugin.github.DescrabbleGithub;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class Main
|
||||
{
|
||||
public static void main(String[] args) throws IOException {
|
||||
var version = System.getenv("VERSION");
|
||||
if (version == null || version.equals("")) {
|
||||
version = "[Replace with current version]";
|
||||
}
|
||||
|
||||
var inputStream = Main.class.getResourceAsStream("/readme-template.html");
|
||||
var targetFile = new File("temp.file");
|
||||
FileUtils.copyInputStreamToFile(inputStream, targetFile);
|
||||
|
||||
var output = System.getProperty("user.dir");
|
||||
|
||||
DescriptionGenerator generator = Descrabble.create()
|
||||
.withTemplate(targetFile)
|
||||
.withVariable("version", version)
|
||||
.withDecorator(new EventsDecorator())
|
||||
.withPlugin(DescrabbleGithub.plugin("README.md"))
|
||||
.build();
|
||||
|
||||
|
||||
generator.generate(output);
|
||||
targetFile.delete();
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
@@ -51,10 +51,6 @@ public class ReadmeGenerator {
|
||||
return version == null ? "NOT_FOUND" : version;
|
||||
}
|
||||
|
||||
public String getCodeExample(String path) {
|
||||
var content = FilesUtility.loadFileContent(path);
|
||||
content = content.substring(content.indexOf("*/") + 2);
|
||||
return content;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
<container>
|
||||
<image width="15%"
|
||||
image="https://raw.githubusercontent.com/jwdeveloper/DepenDance/master/Tools-Readme/src/main/resources/logo.svg">
|
||||
</image>
|
||||
</container>
|
||||
|
||||
|
||||
<container>
|
||||
<title>TikTok Live Java</title>
|
||||
<br>
|
||||
<i align="center">*❤️❤️🎁 *Connect to TikTok live in 3 lines* 🎁❤️❤️*</i>
|
||||
<br>
|
||||
<container>
|
||||
<image width="20%" image="https://jitpack.io/v/jwdeveloper/DepenDance.svg"
|
||||
open="https://jitpack.io/#jwdeveloper/DepenDance"></image>
|
||||
<image image="https://img.shields.io/badge/Discord-%235865F2.svg?style=for-the-badge&logo=discord&logoColor=white"
|
||||
open="https://discord.gg/2hu6fPPeF7"></image>
|
||||
<image image="https://img.shields.io/badge/java-%23ED8B00.svg?style=for-the-badge&logo=openjdk&logoColor=white"></image>
|
||||
</container>
|
||||
</container>
|
||||
|
||||
|
||||
<br>
|
||||
<code language="xml">
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jitpack.io</id>
|
||||
<url>https://jitpack.io</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
<dependency>
|
||||
<groupId>com.github.jwdeveloper.TikTok-Live-Java</groupId>
|
||||
<artifactId>Client</artifactId>
|
||||
<version>{{version}}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</code>
|
||||
<br>
|
||||
|
||||
|
||||
<text>Lightweight dependency injection container that is both small and performance efficient</text>
|
||||
|
||||
<title>Features</title>
|
||||
<br>
|
||||
<text>- [x] Injecting object via constructor</text>
|
||||
<br>
|
||||
<text>- [x] Method object providers</text>
|
||||
<br>
|
||||
<text>- [x] Class Scanner to avoid manual registration [Scanner](#autoscan)</text>
|
||||
<br>
|
||||
<text>- [x] You need to get [List of objects](#lists) in the constructor, no problem</text>
|
||||
<br>
|
||||
<text>- [x] Create [object instance](#object-instances) by yourself and register it to container!</text>
|
||||
<br>
|
||||
<text>- [x] Object lifetimes [SINGLETON, TRANSIENT] [see](#basic)</text>
|
||||
<br>
|
||||
<text>- [x] [Generic types](#generic-types)</text>
|
||||
<br>
|
||||
<text>- [x] [Many constructors](#manyconstructors)</text>
|
||||
<br>
|
||||
<text>- [x] Highly customizable, adjust container with build in [events](#events) system</text>
|
||||
<br>
|
||||
|
||||
<title>Tutorial</title>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user