Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

English fix #5

Merged
merged 25 commits into from
Aug 11, 2019
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Home.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
_Wiki for chatoverflow version [0.2-prealpha](https://github.com/codeoverflow-org/chatoverflow/releases/tag/0.2-prealpha)_

Welcome to the Chat Overflow wiki!
Please see the menu to find more information.
### Welcome to the Chat Overflow wiki!

Please use the sidebar for navigation.
4 changes: 2 additions & 2 deletions _Footer.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
**We need your help to improve the wiki!**
Head over to [codeoverflow-org/chatoverflow-wiki](https://github.com/codeoverflow-org/chatoverflow-wiki) to edit the wiki and create a pull request.
**We need YOUR help to improve the wiki!**
Found a typo or just want to improve the wiki? Head over to [codeoverflow-org/chatoverflow-wiki](https://github.com/codeoverflow-org/chatoverflow-wiki) to edit the wiki and create a pull request. Your help is highly appreciated!

**You still need help?** Join our [discord server](https://discord.gg/sX2Gjbs).
12 changes: 6 additions & 6 deletions development/Adding-a-new-platform-source.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
Thank you for help for the development of *Chat Overflow*.
While plugins live in their own project, source connections (e.g. to platform like Twitch or Discord) exist in the framework itself.
By this, we can make sure that everyone profits from the new possibilites.
Thank you for helping developing *Chat Overflow*.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
While plugins live in their own project, source connections (e.g. to a platform like Twitch or Discord) exist in the framework itself.
By this measure, we can make sure that everyone profits from the same features.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
This wiki entry tries to show you the different steps needed to implement a new connection.

1. Add new types to the API (Also register them in the requirement Input/Output section)
2. Create a new package in the framework services package and implement the source specific connector
3. Create a impl package and implement the types you added in the API
3. Create a impl package and implement the types you have added in the API

## Add new types to the API

Add all needed data transfer objects in `org.codeoverflow.chatoverflow.api.io.dto` and interfaces representing input / output to the correct API package. E.g. a chat input belongs to `org.codeoverflow.chatoverflow.api.io.input.chat` and should extend `ChatInput`.
Add all needed data transfer objects in `org.codeoverflow.chatoverflow.api.io.dto` and interfaces representing input / output to the correct API package. E.g., a chat input belongs to `org.codeoverflow.chatoverflow.api.io.input.chat` and should extend `ChatInput`.

We require you to also register your new type in the corresponding requirement class located in `org.codeoverflow.chatoverflow.api.plugin.configuration`. Yes, this step could be automated by using reflection. But by providing a clean interface to the plugin developer we protect type safety.
We require you to also register your new type in the corresponding requirement class located in `org.codeoverflow.chatoverflow.api.plugin.configuration`. Yes, this step could be automated by using reflection, but by providing a clean interface to the plugin developer we protect type safety.

## Add a new package and connector

Expand Down
2 changes: 1 addition & 1 deletion development/Deploy-ChatOverflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ To deploy Chat Overflow and create runnable jar files, follow these steps:
1. Execute the IntelliJ run configuration `[Deploy] Generate Bootstrap Launcher and deploy` or run the make target with `make bootstrap_deploy`. This updates the `dependencies.xml`-file in the bootstrap-project with the current dependencies, bundles everything and copies it along with start scripts, the license and a readme to the `deploy`-folder. Magic.
2. Navigate to the `deploy`-folder and run the bootstrap launcher with `java -jar ChatOverflow.jar`. After downloading all libraries, a standalone version of Chat Overflow should be started.

A release of chat overflow is simply a zip archive of the deploy folder, without configs or libraries. Don't forget to update Chat Overflow Framework and API Version before a public release.
A release of Chat Overflow is simply a zip archive of the deploy folder, without configs or libraries. Don't forget to update Chat Overflow framework and API version numbers before a public release.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion development/Setting-up-the-Build-Environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ For working on chatoverflow the following tools must be installed on your PC:
* Java 8 version `1.8.0_161` or newer
* [git - version control system](https://git-scm.com/downloads)
* [sbt - Scala build tool](https://www.scala-sbt.org/download.html)
* [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/get-npm) - pakage manager
* [yarn](https://yarnpkg.com/) or [npm](https://www.npmjs.com/get-npm) - package manager

## Windows

Expand Down
22 changes: 11 additions & 11 deletions development/Writing-a-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ There are 3 important steps when you want to create and implement a new chat ove

## Create a new plugin project

Use the *Create Plugin* configuration or start the custom task `sbt create` directly. Enter the basic plugin information in the command promt. This includes the name, version and base plugin folder (e.g. `plugins-public`). The command creates the folder structure of the new plugin and adds a basic build file. Here you can also add custom dependencies.
Use the *Create Plugin* run configuration or start the custom task `sbt create` directly. Enter the basic plugin information in the command promt. This includes the name, version and base plugin folder (e.g. `plugins-public`). The command creates the folder structure of the new plugin and adds a basic build file. Here you can also add custom dependencies.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

Next, run the custom task `sbt fetch` to let the framework look for new plugins and update the plugin reference file `plugins.sbt`. If you're using IntelliJ, you can now reload the framework by hand to register the plugin as new and custom project. You should also run `sbt reload` (Yes, both actions have different effects although they shouldn't).
Next, run the custom task `sbt fetch` to let the framework look for new plugins and update the plugin reference file `plugins.sbt`. If you're using IntelliJ, you can now reload the framework by hand to register the plugin as new as well as a custom project. You should also run `sbt reload` (Yes, both actions have different effects although they shouldn't).
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

## Implement the pluggable

Next, add your first class to the source folder of the new plugin. Supported languages are *Scala* and *Java*, but this guide will only show the scala way - development of java plugins is very similar.

The first class should extend the Pluggable-Interface from `org.codeoverflow.chatoverflow.api.plugin.Pluggable`. When the framework starts up, your plugin will be looked trough for a class implementing this interface to get an entry point to your work. A raw version might look like this:
The first class should extend the Pluggable-Interface from `org.codeoverflow.chatoverflow.api.plugin.Pluggable`. When the framework starts up, your plugin will be looked through for a class implementing this interface to get an entry point to your work. A raw version might look like this:
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

```
class MySuperCoolPlug extends Pluggable{
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -36,11 +36,11 @@ class MySuperCoolPlug extends Pluggable{

```

**A short explanation**: The first 3 Methods `getName`, `getAuthor` and `getDescription` are simple: Just a return a String representing the meta information of your plugin. This inclucde it's name (please make sure to not name two plugins develeoped by yourself the same), your name or pseudonym and a brief topic of the plugins purpose.
**A short explanation**: The first 3 Methods `getName`, `getAuthor` and `getDescription` are simple: They are just returning a String representing the meta information of your plugin. This includes its name (please make sure to not name two plugins develeoped by yourself the same), your name or pseudonym and a brief topic of the plugins purpose.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

The next two methods return the number of the API-Version, you developed the plugin with. These are evaluated in the loading process to ensure that your plugin works with the framework version from the user. You can get these numbers from `org.codeoverflow.chatoverflow.api.APIVersion`.
The next two methods return the number of the API-Version you've developed the plugin with. These are evaluated in the loading process to ensure that your plugin works with the framework version from the user. You can get these numbers from `org.codeoverflow.chatoverflow.api.APIVersion`.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

The last method `createNewPluginInstance` is the interesting one: After the framework checked your meta and version information, it will eventually load your plugin completely. In this method (**and only in this method**), you might return an object that extends the plugin interface. This class is will containt your plugin logic.
The last method `createNewPluginInstance` is the most interesting one: After the framework checked your meta and version information, it will eventually load your plugin completely. In this method (**and only in this method**), you may return an object that extends the plugin interface. This class will contain your plugin logic.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

## Implement the Plugin

Expand All @@ -54,24 +54,24 @@ class MySuperCoolPlugin(manager: PluginManager) extends PluginImpl(manager) {
}
```

Let's talk about *Requirements* first: These are the way to retrieve data from the outside world and returning information to it. Basicaly, you can require everything from a single paramter, set by the user to full access to a users livestream chat.
Let's talk about *Requirements* first: These are used to retrieve data from the outside world and returning information to it. Basically, you can require everything from a single paramter set by the user to full access to a users livestream chat.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

The `getRequirements` method is used by the framework to check what your plugin needs and to ask the user to specify which services or data he wants to give to your plugin. Here is a example:
The `getRequirements` method is used by the framework to check what your plugin needs and to ask the user to specify which services or data he wants to give to your plugin. Here is an example:

```
private val require = new Requirements
private val twitchChatInput = require.input.twitchChat("reqTwitch", "A twitch channel", false)
private val nameToSayHelloTo = require.parameter.string("reqHello", "Your name", false)
```

This code requires reading-access to a twitch livestream chat and a parameter ("*a name to say hello to"*). Note: You can obviously not specify, which channel the user might choose - but you can be sure, that you will get a working input. This is ensured by the framework. Please note, that the requirements element already exists, if you extend `PluginImpl`.
This code requires read-access to a twitch livestream chat and a parameter ("*a name to say hello to"*). Note: You can obviously not specify which channel the user might choose - but you can be sure that you will get a working input. The framework takes care of that. Please note that the requirements element already exists if you extend `PluginImpl`.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

After this, the last step ist the `start` method. And it is as easy as you might think: Just add your own logic now, using the required parameters of your Requirement object. Here is a short example: This code will simply print out all messages from a twitch chat in the console. To access the chat, your required variable is used with the `getValue` method.
After this, the last step is the `start` method. And it is as easy as you might think: Just add your own logic now, using the required parameters of your Requirement object. Here is a short example: This code will simply print out all messages from a twitch chat to the console. To access the chat, your required variable is used with the `getValue` method.

```
twitchChatInput.getValue.registerMessageHandler(msg => println(msg))
```

Of course, you can also add own classes and infrastrucutre by now - the important steps are done, happy coding!

*One last note: If your testing your plugin the first time, a full reload might be needed. Use the custom task `[Advanced] Full Reload and run ChatOverlfow` to do so. Afters this, you can configure the framework to start your plugin using the [CLI](usage/Using-the-CLI.md)!*
*One last note: If you'r testing your plugin the first time, a full reload might be needed. Use the custom task `[Advanced] Full Reload and run ChatOverlfow` to do so. Afters this, you can configure the framework to start your plugin using the [CLI](usage/Using-the-CLI.md)!*
6 changes: 3 additions & 3 deletions services/Discord.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p><img align="right" width="128" height="128" src="/img/services/discord-logo.png"></p>

The discord service allows to connect to a discord text channel to get a list of recent messages,
react on new / edited / deleted messages and reactions.
The discord service allows you to connect to a discord text channel to get a list of recent messages,
react on new / edited / deleted messages as well as reactions.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

You can also send messages, files or even [fancy embeds](https://www.discord.club/static/home/img/embedg.png).

Expand All @@ -23,7 +23,7 @@ Then head over to the bot page and add a bot:

![](/img/services/discord-build-a-bot.png)

Now you can retrieve the authentication token, click on copy and [add it as credentials value](/usage/Using-the-GUI.md#Set-credentials) using the GUI.
Now you can retrieve the authentication token, click on copy and [add it as a credentials value](/usage/Using-the-GUI.md#Set-credentials) using the GUI.

![](/img/services/discord-bot-token.png)

Expand Down
4 changes: 2 additions & 2 deletions services/Serial.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<p><img align="right" width="128" height="54" src="/img/services/serial-arduino-logo.png"></p>

The Serial service allows to communicate with a device that is connected to your pc over a serial port.
The Serial service allows you to communicate with a device that is connected to your pc over a serial port.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

The most common example is exchanging data with an [arduino](https://www.arduino.cc/) over USB.

Expand Down Expand Up @@ -129,7 +129,7 @@ public class TestPlugin extends PluginImpl {

### Example arduino script

An simple ping-pong example script for your arduino.
A simple ping-pong example script for your arduino.
```cpp
String inputString = "";
boolean stringComplete = false;
Expand Down
6 changes: 3 additions & 3 deletions services/Twitch-Chat.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ They can get a List of recent messages, listen for new messages or send messages
## Credentials

### `oauth` _(required)_
The authentication token for accessing the twitch irc chat with your account.
The authentication token for accessing the twitch IRC chat with your account.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

If you don't have such a token yet you can generate it on https://twitchapps.com/tmi/.

Just log in to your twitch account and copy the token.
Then add it as credentials value with the key `oauth` as described [here](/usage/Using-the-GUI.md#Set-credentials).
Just log into your twitch account and copy the token.
Then add it as a credentials value with the key `oauth` as described [here](/usage/Using-the-GUI.md#Set-credentials).

_Note: Copy the entire key **including** the `oauth:` at the beginning._

Expand Down
6 changes: 3 additions & 3 deletions usage/Frequent-Issues.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## Run Configuration Bug
Due to IntelliJ version differences and usage on Windows vs. Mac OS, the run configurations show problems, sometimes. Change the *classpath or module* under `Edit configurations...` back to the Chat Overflow root module, and everything should be fine.
Due to IntelliJ version differences as well as differences on platforms (e.g. Windows vs. Mac OS) the run configurations could show problems. If this error occurs, change the `classpath or module` setting under `Edit configurations...` back to the Chat Overflow root module. Now everything should be working fine again.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

## Credentials value encrypted with wrong auth key
![](/img/usage/value-encrypted-wrong-key.png)
```
ERROR configuration.CryptoUtil$ - Your environment does not work with AES256.Please update your java runtime version to at least: 1.8.0_161
```
If you see this image or error message you are probably running on an old java version that doesn't work with AES 256 bit encryption.
Please follow the instructions from the error message and update java to at least `1.8.0_161`.
More information about the issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size).
To fix this error you have to update java to at least `1.8.0_161`.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
More information about this issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size).
31 changes: 10 additions & 21 deletions usage/Installation.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,23 @@
This short tutorial is meant for end users of ChatOverflow and shows how to install and run the framework with all dependencies.
If you want to set up a build environment for developing plugins or contributing to the framework,
If you want to set up a build environment for developing plugins or to contribute to the framework,
head over to [Build Environment](development/Setting-up-the-Build-Environment.md).

## Prerequisites

For running Chatoverflow you need Java 8, version `1.8.0_161` or newer.
[Download it form here.](https://www.java.com/en/download/)
For running Chatoverflow you will need Java 8, version `1.8.0_161` or newer.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
[You can download it here.](https://www.java.com/en/download/)
andi-makes marked this conversation as resolved.
Show resolved Hide resolved

## Windows
## Installation

1. Head over to the [releases](https://github.com/codeoverflow-org/chatoverflow/releases/latest)
1. Head over to the [releases](https://github.com/codeoverflow-org/chatoverflow/releases/latest) tab
and download the ChatOverflow `.zip` file from the assets section of the latest release.

2. Extract the zip file (it's clever to extract it in a folder called chatoverflow 😉)
2. Extract the zip file. (It's clever to extract it in a folder called chatoverflow 😉)

3. Execute the `ChatOverflow.bat`.
3. If you are on Windows, execute `ChatOverflow.bat`. If you are on an UNIX operating system like MacOS or Linux execute `ChatOverflow.sh`.

4. Wait for the launcher to download all dependencies ⏳
4. Wait for the launcher to download all dependencies.

5. The framework will start. When executing the `ChatOverflow.bat` again it will skipp downloading the dependencies.
5. The framework will start. Have fun using it! 😃

## UNIX operating systems (MacOs / Linux)

1. Head over to the [releases](https://github.com/codeoverflow-org/chatoverflow/releases/latest)
and download the ChatOverflow `.zip` file from the assets section of the latest release.

2. Extract the zip file (it's clever to extract it in a folder called chatoverflow 😉)

3. Execute the `ChatOverflow.sh`.

4. Wait for the launcher to download all dependencies ⏳

5. The framework will start. When executing the `ChatOverflow.sh` again it will skipp downloading the dependencies.
6. To start the framework again, just re-execute the script (`ChatOverflow.bat` or `ChatOverflow.sh`, depending on your system). Don't worry, it won't download the dependencies again.
4 changes: 2 additions & 2 deletions usage/Using-the-CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ You can also configure the paths of config- and credentials-files to create cust
-c customConfigFolder -p customPluginFolder
```

Useful is the combination of login and startup plugins for rapid prototyping.
The combination of logging in and starting plugins with one command is very useful for rapid prototyping.

```
-l myPassword -s startupPluginInstance1,startupPluginInstance2
```

By default, plugin output on console is disable. But you can still enable it with the flag `-o`.
By default the output of a plugin is disabled. You can enable it with the flag `-o`.
andi-makes marked this conversation as resolved.
Show resolved Hide resolved
Loading