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

Commit d5297f8

Browse files
author
DragonCoder01
committed
Implemented all the changes Gerd suggested but ...
Line 3 in development/Adding-a-new-platform-source.md. A imporvement for it will be in the next commit.
1 parent f849f5e commit d5297f8

File tree

9 files changed

+27
-27
lines changed

9 files changed

+27
-27
lines changed

development/Adding-a-new-platform-source.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Thank you for helping developing *Chat Overflow*.
1+
Thank you for improving *Chat Overflow*.
22
While plugins live in their own project, source connections (e.g. to a platform like Twitch or Discord) exist in the framework itself.
33
By this measure, we can make sure that everyone profits from the same features.
44
This wiki entry tries to show you the different steps needed to implement a new connection.

development/Deploy-ChatOverflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ To deploy Chat Overflow and create runnable jar files, follow these steps:
33
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.
44
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.
55

6-
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.
6+
A release of Chat Overflow is simply a zip archive of the deploy folder, without configs or libraries. Don't forget to update the Chat Overflow framework and API version numbers before a public release.

development/Writing-a-plugin.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ There are 3 important steps when you want to create and implement a new chat ove
88

99
## Create a new plugin project
1010

11-
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.
11+
Use the *Create Plugin* run configuration or start the custom task `sbt create` directly. Enter the basic plugin information in the command prompt. 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.
1212

13-
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).
13+
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 manually to register the plugin as a new custom project. You should also run `sbt reload` (Yes, both actions have different effects although they shouldn't).
1414

1515
## Implement the pluggable
1616

1717
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.
1818

19-
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:
19+
The first class should extend the Pluggable Interface from `org.codeoverflow.chatoverflow.api.plugin.Pluggable`. When the framework starts up, it will search for a class implementing this interface in your plugin to get an entry point. A raw version might look like this:
2020

2121
```
2222
class MySuperCoolPlug extends Pluggable {
@@ -36,11 +36,11 @@ class MySuperCoolPlug extends Pluggable {
3636
3737
```
3838

39-
**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.
39+
**A short explanation**: The first 3 methods `getName`, `getAuthor` and `getDescription` are simple: They just return a String representing the metadata of your plugin. This includes its name (please make sure to not name two plugins identically), your name or pseudonym and a brief summary of the plugins purpose.
4040

41-
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`.
41+
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 user's framework version. You can get these numbers from `org.codeoverflow.chatoverflow.api.APIVersion`.
4242

43-
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.
43+
The last method `createNewPluginInstance` is the most interesting one: After the framework checked your metadata, 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.
4444

4545
## Implement the Plugin
4646

@@ -64,7 +64,7 @@ private val twitchChatInput = require.input.twitchChat("reqTwitch", "A twitch ch
6464
private val nameToSayHelloTo = require.parameter.string("reqHello", "Your name", false)
6565
```
6666

67-
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`.
67+
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`.
6868

6969
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.
7070

@@ -74,4 +74,4 @@ twitchChatInput.getValue.registerMessageHandler(msg => println(msg))
7474

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

77-
*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)!*
77+
*One last note: If you are testing your plugin for the first time, a full reload might be needed. Use the custom task `[Advanced] Full Reload and run ChatOverflow` to do so. Afters this, you can configure the framework to start your plugin using the [CLI](usage/Using-the-CLI.md)!*

services/Discord.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<p><img align="right" width="128" height="128" src="/img/services/discord-logo.png"></p>
22

33
The discord service allows you to connect to a discord text channel to get a list of recent messages,
4-
react on new / edited / deleted messages as well as reactions.
4+
react on new, edited or deleted messages as well as reactions.
55

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

services/Serial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<p><img align="right" width="128" height="54" src="/img/services/serial-arduino-logo.png"></p>
22

3-
The Serial service allows you to communicate with a device that is connected to your pc over a serial port.
3+
The Serial service allows you to communicate with a device that is connected to your PC over a serial port.
44

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

services/Twitch-Chat.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<p><img align="right" width="128" height="128" src="/img/services/twitch-glitch.png"></p>
22

3-
The twitch chat service allows plugins to connect to a channels chat by using IRC.
3+
The Twitch chat service allows plugins to connect to a channels chat by using IRC.
44

55
They can get a List of recent messages, listen for new messages or send messages to the chat.
66

77
## Credentials
88

99
### `oauth` _(required)_
10-
The authentication token for accessing the twitch IRC chat with your account.
10+
The authentication token for accessing the Twitch IRC chat with your account.
1111

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

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

1717
_Note: Copy the entire key **including** the `oauth:` at the beginning._
@@ -32,7 +32,7 @@ import org.codeoverflow.chatoverflow.api.io.event.chat.twitch.TwitchChatMessageR
3232
import org.codeoverflow.chatoverflow.api.io.dto.chat.twitch.TwitchChatMessage;
3333

3434
public class TestPlugin extends PluginImpl {
35-
//require a new twitch chat input
35+
//require a new Twitch chat input
3636
private Requirement<TwitchChatInput> twitchIn =
3737
require.input.twitchChat("twitchChat", "The Twitch chat", false);
3838

@@ -96,7 +96,7 @@ import org.codeoverflow.chatoverflow.api.plugin.PluginImpl;
9696
import org.codeoverflow.chatoverflow.api.plugin.PluginManager;
9797

9898
public class TestPlugin extends PluginImpl {
99-
//require a new twitch chat output
99+
//require a new Twitch chat output
100100
private Requirement<TwitchChatOutput> twitchOut =
101101
require.output.twitchChat("twitchChat", "The Twitch chat", false);
102102

@@ -119,7 +119,7 @@ public class TestPlugin extends PluginImpl {
119119
+ LocalTime.now().format(DateTimeFormatter.ISO_LOCAL_TIME) + " Uhr!";
120120
log(timeMessage);
121121

122-
//Output the message to the twitch chat
122+
//Output the message to the Twitch chat
123123
twitchOut.get().sendChatMessage(timeMessage);
124124
}
125125

usage/Frequent-Issues.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
## Run Configuration Bug
2-
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.
2+
Because of the differences in IntelliJ versions the run configurations could be broken. If they are broken, change the `classpath or module` setting in `Edit configurations...` to ChatOverflow root module. Now everything should be working fine again.
33

44
## Credentials value encrypted with wrong auth key
55
![](/img/usage/value-encrypted-wrong-key.png)
66
```
7-
ERROR configuration.CryptoUtil$ - Your environment does not work with AES256.Please update your java runtime version to at least: 1.8.0_161
7+
ERROR configuration.CryptoUtil$ - Your environment does not work with AES256.Please update your Java runtime version to at least: 1.8.0_161
88
```
9-
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.
10-
To fix this error you have to update java to at least `1.8.0_161`.
9+
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.
10+
To fix this error you have to update Java to version `1.8.0_161` or later.
1111
More information about this issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size).

usage/Installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ head over to [Build Environment](development/Setting-up-the-Build-Environment.md
44

55
## Prerequisites
66

7-
For running Chatoverflow you will need Java 8, version `1.8.0_161` or newer.
8-
[You can download it here.](https://www.java.com/en/download/)
7+
For running Chatoverflow you will need Java 8, version `1.8.0_161` or later.
8+
You can download it [here].(https://www.java.com/en/download/)
99

1010
## Installation
1111

usage/Using-the-GUI.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ If the login was successful the gui will display the authentication key for this
1616
## Creating a plugin instance
1717
Before running a plugin you have to create a plugin instance.
1818
All available plugins are listed under `Plugin types`.
19-
Add more plugins by putting the plugin `.jar` files into the plugins folder. If you are adding new plugins to the folder when the framework is running, you need to restart the framework in order to load the newly added plugins.
19+
Add more plugins by putting the plugin `.jar` files into the plugins folder. If you are adding new plugins to the folder while the framework is still running, you need to restart the framework in order for it to load the newly added plugins.
2020

2121
![](/img/usage/plugin-types.png)
2222

23-
Enter the plugin name as well as the author of the plugin and give the instance a name (whatever you like), then click on `CREATE`:
23+
Enter the plugin and author name of the plugin and give the instance a name (whatever you like), then click on `CREATE`:
2424

2525
![](/img/usage/create-plugin.png)
2626

@@ -29,7 +29,7 @@ The plugin instance should now be listed under `Plugin instances`:
2929
![](/img/usage/plugin-instances.png)
3030

3131
You can use the pen to copy the name of an instance.
32-
There are buttons that allow you to `START` / `STOP` an instance, to show its log (if running) or requirements and a button to `DELETE` the instance (just make sure to stop it before deleting it).
32+
There are buttons that allow you to `START` / `STOP` an instance, to show its log (if running) or requirements and a button to `DELETE` the instance (just make sure to stop it before deleting it).
3333

3434
## Setting plugin requirements
3535
Before you can start a plugin you need to set its requirements.

0 commit comments

Comments
 (0)