Skip to content

Commit

Permalink
Merge pull request #5 from samuele794/TakaoV2.0
Browse files Browse the repository at this point in the history
Takao v2.0
  • Loading branch information
samuele794 authored May 19, 2019
2 parents 043b655 + 122378b commit af30802
Show file tree
Hide file tree
Showing 894 changed files with 12,741 additions and 67,494 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@ hs_err_pid*

.gradle
/build/
tokenDiscord.txt
*.db
.idea/
gradle/wrapper/gradle-wrapper.jar
src/main/bin/logback.xml
src/main/bin/jsonboss.json
src/main/resources/twitter4j.properties
src/main/resources/hibernate.cfg.xml
src/main/resources/application-dev.properties
src/main/resources/application-prod.properties
158 changes: 95 additions & 63 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,101 +1,133 @@
plugins {
id 'org.springframework.boot' version '2.1.4.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.3.31'
id 'org.jetbrains.kotlin.plugin.spring' version '1.3.31'
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '2.0.1'
id 'com.github.johnrengelman.shadow' version '4.0.4'
id 'org.jetbrains.dokka' version '0.9.18'
}

mainClassName = 'starter.start'

group 'it.github.samuele794.discordbotTakao'
version '1.2.0'
def jdaVersion = '3.8.2_459'
apply plugin: 'io.spring.dependency-management'

group = 'it.discordbot'
version = '2.0'
sourceCompatibility = '1.8'

repositories {
jcenter()
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
jcenter()
}

dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
jar {
enabled = true
}

compile "net.dv8tion:JDA:3.8.2_459"
// https://mvnrepository.com/artifact/com.rometools/rome
compile group: 'com.rometools', name: 'rome', version: '1.12.0'
// jsoup HTML parser library @ https://jsoup.org/
compile 'org.jsoup:jsoup:1.11.3'
// https://mvnrepository.com/artifact/com.google.code.gson/gson
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.5'
springBoot {
buildInfo()
}

compile "org.apache.commons:commons-text:1.3"
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
compile group: 'org.quartz-scheduler', name: 'quartz', version: '2.3.0'
bootJar {
classifier = 'boot'
manifest {
attributes 'Start-Class': 'it.discordbot.StartBotKt'

// https://mvnrepository.com/artifact/org.postgresql/postgresql
compile group: 'org.postgresql', name: 'postgresql', version: '42.2.5'
// https://mvnrepository.com/artifact/org.xerial/sqlite-jdbc
// compile group: 'org.xerial', name: 'sqlite-jdbc', version: '3.25.2'
}
launchScript()
}

/*dokka {
outputFormat = 'html-as-java'
outputDirectory = "$buildDir/javadoc"
jdkVersion = 8
includeNonPublic = true
}*/

task dokkaPureKotlindoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'html'
outputDirectory = "$buildDir/kotlindoc"
jdkVersion = 8
includeNonPublic = true
noJdkLink = false
noStdlibLink = false
}

task dokkaPureJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'javadoc'
outputDirectory = "$buildDir/javadoc"
jdkVersion = 8
includeNonPublic = true
noJdkLink = false
noStdlibLink = false
}

task dokkaKotlindocAsJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
outputFormat = 'html-as-java'
outputDirectory = "$buildDir/kotlin-as-javadoc"
jdkVersion = 8
includeNonPublic = true
noJdkLink = false
noStdlibLink = false
}

//SISTEMA PER LOG
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.2.3'

// https://mvnrepository.com/artifact/com.sedmelluq/lavaplayer-natives
compile group: 'com.sedmelluq', name: 'lavaplayer-natives', version: '1.3.12'
dependencies {


// compile 'com.sedmelluq:lavaplayer:1.3.11' // https://mvnrepository.com/artifact/commons-validator/commons-validator
compile group: 'commons-validator', name: 'commons-validator', version: '1.6'
implementation 'org.springframework.boot:spring-boot-starter'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
testImplementation 'org.springframework.boot:spring-boot-starter-test'

//JDA 3.8.2
// https://mvnrepository.com/artifact/com.squareup.okhttp3/okhttp
compile group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.14.0'
//SPRING LIBRARY
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.1.4.RELEASE'
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.9.+"


//DIPENDENZE PER MUSICBOT
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.7'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.9.8'
implementation 'net.dv8tion:JDA:3.8.3_463'

//RSS + HTML PARSER
// https://mvnrepository.com/artifact/com.rometools/rome
implementation group: 'com.rometools', name: 'rome', version: '1.12.0'
// jsoup HTML parser library @ https://jsoup.org/
implementation 'org.jsoup:jsoup:1.11.3'

//ESCAPE UTIL
// https://mvnrepository.com/artifact/commons-io/commons-io
compile group: 'commons-io', name: 'commons-io', version: '2.6'
// https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.9.8'
implementation "org.apache.commons:commons-text:1.3"

//POSTGRESQL DRIVER
// https://mvnrepository.com/artifact/org.postgresql/postgresql
implementation group: 'org.postgresql', name: 'postgresql', version: '42.2.5'

//TwitterAPI
// https://mvnrepository.com/artifact/org.twitter4j/twitter4j-core
compile group: 'org.twitter4j', name: 'twitter4j-core', version: '4.0.7'
implementation group: 'org.twitter4j', name: 'twitter4j-core', version: '4.0.7'
// https://mvnrepository.com/artifact/org.twitter4j/twitter4j-stream
compile group: 'org.twitter4j', name: 'twitter4j-stream', version: '4.0.7'
implementation group: 'org.twitter4j', name: 'twitter4j-stream', version: '4.0.7'
// https://mvnrepository.com/artifact/org.twitter4j/twitter4j-async
compile group: 'org.twitter4j', name: 'twitter4j-async', version: '4.0.7'

compile "org.hibernate:hibernate-core:5.4.2.Final"
implementation group: 'org.twitter4j', name: 'twitter4j-async', version: '4.0.7'

//MUSIC PLAYER
implementation 'com.sedmelluq:lavaplayer:1.3.17'

}

javadoc {
options.showAll()
options.setDestinationDirectory()
options.encoding('UTF-8')
options.setUse(true)
options.author(true)
options.version(true)
options.windowTitle("Documentazione TakaoBot")
options.docTitle("Documentazione TakaoBot")
exclude("com/sedmelluq/**")
compileKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
}

if (JavaVersion.current().isJava8Compatible()) {
tasks.withType(Javadoc) {
// disable the crazy super-strict doclint tool in Java 8
//noinspection SpellCheckingInspection
options.addStringOption('Xdoclint:none', '-quiet')
compileTestKotlin {
kotlinOptions {
freeCompilerArgs = ['-Xjsr305=strict']
jvmTarget = '1.8'
}
}


compileJava.options.encoding = 'UTF-8'
8 changes: 8 additions & 0 deletions docs/css/commandStyle.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@
}
}

::selection {
background: #06c;
}

::-moz-selection {
background: #06c;
}

.logoCommand {
height: 32px;
margin-left: 10px;
Expand Down
34 changes: 34 additions & 0 deletions docs/css/docStyle.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#parent>#button-left {
opacity: 0.3;
position: absolute;
left: 5px;
top: 5px;
transition: 0.5s;
}

#parent>#button-right {
opacity: 0.3;
position: absolute;
left: 55px;
top: 5px;
transition: 0.5s;
}

.btn{
padding: 5px 5px;
}
.svg-arrow{
margin-top: 10px
}

iframe{
background-color: #ffffff;
}

#parent>#button-left {
opacity: 1;
}

#parent>#button-right {
opacity: 1;
}
38 changes: 38 additions & 0 deletions docs/page/commands.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,21 @@ <h3>Indice</h3>
<a class="nav-link" href="#2_4" onclick="showTop()"><span>BDO Patch
Stop</span></a>
</li>

<li class="nav-link">
<a class="nav-link" href="#2_5" onclick="showTop()"><span>BDO Boss
Start</span></a>
</li>

<li class="nav-link">
<a class="nav-link" href="#2_6" onclick="showTop()"><span>BDO Boss
Stop</span></a>
</li>

<li class="nav-link">
<a class="nav-link" href="#2_7" onclick="showTop()"><span>BDO Boss
Table</span></a>
</li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -325,6 +340,29 @@ <h4 class="it-page-section" id="2_4">BDO Patch Stop</h4>
<br />
Il comando può essere lanciato su qualunque canale.
</p>
<br />
<h4 class="it-page-section" id="2_5">BDO Boss Start</h4>
<p>
<kbd>%BDOBossStart</kbd><br />
Questo comando permette di iscriversi agli allarmi dei boss di BDO.
<br>
Il comando deve essere lanciato sul canale su cui si desidera
ricevere i boss.
</p>
<br>
<h4 class="it-page-section" id="2_6">BDO Boss Stop</h4>
<p>
<kbd>%BDOBossStopt</kbd><br />
Questo comando permette disiscriversi agli allarmi dei boss di BDO.
<br>
Il comando può essere lanciato su qualunque canale
</p>
<br>
<h4 class="it-page-section" id="2_7">BDO Boss Table</h4>
<p>
<kbd>%BDOBossTable</kbd><br />
Questo comando ti fa vedere la tabella dei boss di BDO.
</p>

<br />
<h2 class="it-page-section" id="3">
Expand Down
36 changes: 32 additions & 4 deletions docs/page/documentazione.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,25 @@
<script src="../js/jquery-3.4.0.min.js"></script>
<link rel="stylesheet" href="../css/bootstrap-italia.min.css" />
<link rel="stylesheet" href="../css/style.css" />
<link rel="stylesheet" href="../css/docStyle.css" />
<script src="../js/bootstrap-italia.min.js"></script>

<!-- CSS -->
</head>

<script>
function backButton() {
var url = document.getElementById("ifram").contentWindow.location.href
if (!url.includes("/kotlindoc/index.html")) {
document.getElementById("ifram").contentWindow.history.back()
}
}

function forwardButton() {
document.getElementById("ifram").contentWindow.history.forward()
}
</script>

<body>
<!-- JS -->

Expand Down Expand Up @@ -129,9 +143,21 @@ <h2 class="no_toc">TakaoBot</h2>

<div class="section main-background">
<div class="container my-4">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" title="Documentazione TakaoBot" src="../page/javadoc/index.html"
allowfullscreen></iframe>
<div class="embed-responsive embed-responsive-16by9" id="parent">
<iframe id="ifram" class="embed-responsive-item" title="Documentazione TakaoBot"
src="../page/kotlindoc/index.html" allowfullscreen>
</iframe>
<button id="button-left" class="btn btn-primary btn-icon" onclick="backButton()">
<svg style="top: 10px" class="icon icon-white">
<use xlink:href="../svg/sprite.svg#it-arrow-left"></use>
</svg>
</button>

<button id="button-right" class="btn btn-primary btn-icon" onclick="forwardButton()">
<svg style="top: 10px" class="icon icon-white">
<use xlink:href="../svg/sprite.svg#it-arrow-right"></use>
</svg>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -180,7 +206,9 @@ <h4>
</li>

<li class="list-inline-item">
<a class="p-2 text-white" href="https://www.linkedin.com/in/samuele-bruschi-a6a65815b/" target="_blank">
<a class="p-2 text-white"
href="https://www.linkedin.com/in/samuele-bruschi-a6a65815b/"
target="_blank">
<svg class="icon icon-sm icon-white align-top">
<use xlink:href="../svg/sprite.svg#it-linkedin-square"></use>
</svg>
Expand Down
Loading

0 comments on commit af30802

Please sign in to comment.