diff --git a/Home.md b/Home.md index 536428c..3783145 100644 --- a/Home.md +++ b/Home.md @@ -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. \ No newline at end of file +### Welcome to the Chat Overflow wiki! + +Please use the sidebar for navigation. \ No newline at end of file diff --git a/_Footer.md b/_Footer.md index a211f26..bc593ff 100644 --- a/_Footer.md +++ b/_Footer.md @@ -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). \ No newline at end of file diff --git a/development/Adding-a-new-platform-source.md b/development/Adding-a-new-platform-source.md index 5a65e3b..588bf49 100644 --- a/development/Adding-a-new-platform-source.md +++ b/development/Adding-a-new-platform-source.md @@ -1,17 +1,18 @@ -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 improving *Chat Overflow*. +While plugins live in their own project, source connections (e.g. to a platform like Twitch or Discord) exist in the framework itself. + +We made this design choice so that all platform source connectors are free to access by all plugin developers. 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 diff --git a/development/Deploy-ChatOverflow.md b/development/Deploy-ChatOverflow.md index 8e73129..0599f63 100644 --- a/development/Deploy-ChatOverflow.md +++ b/development/Deploy-ChatOverflow.md @@ -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/development/Setting-up-the-Build-Environment.md b/development/Setting-up-the-Build-Environment.md index e2e330a..44620d1 100644 --- a/development/Setting-up-the-Build-Environment.md +++ b/development/Setting-up-the-Build-Environment.md @@ -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 diff --git a/development/Writing-a-plugin.md b/development/Writing-a-plugin.md index eb5c1db..e297d70 100644 --- a/development/Writing-a-plugin.md +++ b/development/Writing-a-plugin.md @@ -8,18 +8,18 @@ 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 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. -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 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). ## 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, it will search for a class implementing this interface in your plugin to get an entry point. A raw version might look like this: ``` -class MySuperCoolPlug extends Pluggable{ +class MySuperCoolPlug extends Pluggable { override def getName: String = ??? @@ -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 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. -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 user's framework version. You can get these numbers from `org.codeoverflow.chatoverflow.api.APIVersion`. -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 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. ## Implement the Plugin @@ -54,9 +54,9 @@ 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 parameter set by the user to full access to a users livestream chat. -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 @@ -64,9 +64,9 @@ private val twitchChatInput = require.input.twitchChat("reqTwitch", "A twitch ch 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`. -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)) @@ -74,4 +74,4 @@ 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)!* \ No newline at end of file +*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)!* diff --git a/services/Discord.md b/services/Discord.md index fd32ec5..15bf7f0 100644 --- a/services/Discord.md +++ b/services/Discord.md @@ -1,7 +1,7 @@