From b817088c6985294f9b7e3763b7dab4e53e7aa2ad Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 27 Jul 2019 10:49:19 +0200 Subject: [PATCH 01/22] Fixed typos in Home.md --- Home.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 From 1e77bbab3ddb1fce698de1c8611856a0088c4204 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 27 Jul 2019 10:56:32 +0200 Subject: [PATCH 02/22] Improved _Footer.md --- _Footer.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 3dbd3808696369cdccf1eedf01c343d5035f1c63 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 27 Jul 2019 10:59:43 +0200 Subject: [PATCH 03/22] Fixed typos and improved usage/Installation.md --- usage/Installation.md | 69 +++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/usage/Installation.md b/usage/Installation.md index b382fe3..72372f3 100644 --- a/usage/Installation.md +++ b/usage/Installation.md @@ -1,51 +1,56 @@ -This tutorial shows how to install the chat overflow framework. By now, working with the development environment is the only way. Currently, there are **no builds available.** +## Installation +This tutorial shows how to install the chat overflow framework. For now, working with the development environment is the only way. Currently, there are **no builds available.** -### Pro + -### Not so Pro +### Step by step guide -0. Download and install [git](https://git-scm.com/) (obviously) and [Node.js](https://nodejs.org/en/download/). Make sure that you can run it using the console. +0. Install [git](https://git-scm.com/) and [Node.js](https://nodejs.org/en/download/). Make sure to add them to your PATH. To verify the install, open a console and execute `git --version` and `npm --version`. If the version number is echoed back, the installation is valid. 1. Clone the main repository using `git clone https://github.com/codeoverflow-org/chatoverflow.git`. -2. Navigate to the created chatoverflow-folder, e.g. using `cd chatoverflow`. -3. Clone the [api repository](https://github.com/codeoverflow-org/chatoverflow-api) into a folder named "api". using `git clone https://github.com/codeoverflow-org/chatoverflow-api.git api`. -4. Clone the [gui repository](https://github.com/codeoverflow-org/chatoverflow-gui) into a folder named "gui". using `git clone https://github.com/codeoverflow-org/chatoverflow-gui.git gui`. -5. Clone the [public plugins repository](https://github.com/codeoverflow-org/chatoverflow-plugins) into a folder named "plugins-public" using `git clone https://github.com/codeoverflow-org/chatoverflow-plugins.git plugins-public`. +2. `git` created a folder named `chatoverflow`. Navigate into it using `cd chatoverflow`. +3. Clone the [api repository](https://github.com/codeoverflow-org/chatoverflow-api) into a folder named `api` using `git clone https://github.com/codeoverflow-org/chatoverflow-api.git api`. +4. Clone the [gui repository](https://github.com/codeoverflow-org/chatoverflow-gui) into a folder named `gui` using `git clone https://github.com/codeoverflow-org/chatoverflow-gui.git gui`. +5. Clone the [public plugins repository](https://github.com/codeoverflow-org/chatoverflow-plugins) into a folder named `plugins-public` using `git clone https://github.com/codeoverflow-org/chatoverflow-plugins.git plugins-public`. - Site note: You can name the folders whatever you want. But if you do so, update the names in the main [build-file](https://github.com/codeoverflow-org/chatoverflow/blob/42b9469fe489fe5efeb4aa70f278e3558fccab7d/build.sbt#L64). + Side note: You can rename the folders to your liking, but if you do change their names, update them in the main [build-file](https://github.com/codeoverflow-org/chatoverflow/blob/42b9469fe489fe5efeb4aa70f278e3558fccab7d/build.sbt#L64). -6. Open up your most favorite IDE for java (and scala) development. I recommend using [IntelliJ IDEA](https://www.jetbrains.com/idea/). There is also a free community version available! -7. Make sure, IntelliJ IDEA and the scala plugin are up to date. Every time I open this software, a new update is available... -8. Choose open project and select the freshly cloned `chatoverflow` folder (with the main build.sbt) in it. Make sure, auto-import is NOT enabled. -9. Click on `Refresh sbt project`. Make sure to use a up-to-date java 1.8 SDK, do not change any other settings in the dialog window. -10. Wait for 5.2 years. In the background, 3 projects are build, ressources will be downloaded and a lot of magic happens! -11. When the process finished, you should see the project and its children in the project view. Get to know them (or wait till I introduce them later). +6. Open your favorite IDE for java and scala development. We recommend using [IntelliJ IDEA](https://www.jetbrains.com/idea/). You can use the free community version as well as the ultimate version. + + Side note: The next steps assume that you are using IntelliJ IDEA. + +7. If there are any updates to either IntelliJ IDEA or the scala plugin, please install them. +8. Open the cloned `chatoverflow` folder. Make sure that IntelliJ's `auto-import` is NOT enabled. +9. Click on `Refresh sbt project`. Make sure to use a up-to-date java 1.8 SDK and do not change any other settings in the dialog window. +10. Please wait for the process to finish. In the background, 3 projects are built, resources will be downloaded and a lot of magic happens! +11. When the process has finished, you should see the project and its children in IntelliJ's project view. - Site note: The run configurations contain a lot of sbt commands and presets for plugin development. You will probably never need more. Brief documentation can be found in the main build.sbt file. + Side note: The run configurations contain a lot of sbt commands and presets for plugin development. You probably will not need more. Brief documentation can be found in the main build.sbt file. 12. Select the run configuration `Fetch plugins (sbt fetch)` and execute it. A file named `plugins.sbt` should be generated, containing all references to plugins and the api project. -13. Use sbt reload (the refresh icon in the upper left corner of the sbt window, opened e.g. by View -> Tool Windows -> SBT) to reload the whole project. Now, the child projects should be recognized correctly. -14. Have a look at the application run configurations. Do they have an red X? Then they are broken. Click on `Edit configurations` and select `root` as module ("Use classpath as module"). Now, they should be happy. -15. Execute the run configuration `[Advanced] Full Reload and Run ChatOverflow` (and pray). This is only needed for the first startup and when you create a new plugin! +13. Use `sbt reload` (the refresh icon in the upper left corner of the sbt window, opened by View -> Tool Windows -> SBT) to reload the whole project. Now, the child projects should have been recognized correctly. +14. Have a look at the application run configurations. Do they have a red X? Then they are broken. Click on `Edit configurations` and select `root` as module ("Use classpath as module"). Now it should work, . +15. Execute the run configuration `[Advanced] Full Reload and Run ChatOverflow`. This is only needed for the first compilation or if you create a new plugin! Those are the steps that are executed now: - * A lot happens now. First, all target folders and the build environment is cleaned. - * Then, the project is freshly build and all plugins are fetched. The plugins.sbt file is generated. Then, the whole build environment is reloaded. + * First, all target folders and the build environment is cleaned. + * Then the project is built and all plugins are fetched. The `plugins.sbt` file gets generated. After that, the whole build environment gets reloaded. * Next, all plugin versions and the api version are printed for debug reasons. - * Last, all plugins compiled code is packaged into several .JAR-Archives and copied to the `plugins`-folder. - * Everything is set up, and the chat overflow framework is executed. It checks the plugin folder and tries to load the plugins. Done! + * Finally, the plugin's compiled code gets packaged into several .JAR-Archives and they get copied into the `plugins`-folder. + * Everything is set up and the chat overflow framework gets executed. Now the framework tries to load the plugins from the `plugins`-folder. Done! - Site note: You do not have to repeat this step after each simple change. There is also a `[Simple]` run configuration for this. + + Side note: You must not re-execute this run configuration after you have changed something. Now you can just use the `[Simple]` run configuration. - Yet another site note: The projects folder structure is realy easy. + Yet another side note: The projects folder structure is really simple. - * the api folder contains the API-project with all common chat overflow modelling. - * the plugins folder contains packaged plugins. Just leave him alone. - * the plugins-public folder contains all official/public chat overflow plugins. Each plugin has its own sub project. - * the project folder contains build code for the plugin framework. - * the src folder contains the chat overflow framework code. - * the target folder contains the build framework. + * The `api` folder contains the API-project with all common chat overflow modelling. + * The `plugins` folder contains our packaged plugins. Just leave them alone. + * The `plugins-public` folder contains all official/public chat overflow plugins. Each plugin has its own sub project. + * The `project` folder contains build code for the plugin framework. + * The `src` folder contains the chat overflow framework code. + * The `target` folder contains the built framework. 16. You're done. Happy coding! \ No newline at end of file From 3c8fda533e8a27217c4ca85b4b9c5c6751146a87 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 27 Jul 2019 11:35:14 +0200 Subject: [PATCH 04/22] Fixed typos and improved usage/Frequent-Issues.md --- usage/Frequent-Issues.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usage/Frequent-Issues.md b/usage/Frequent-Issues.md index 0a73cac..ddab6c5 100644 --- a/usage/Frequent-Issues.md +++ b/usage/Frequent-Issues.md @@ -1,5 +1,5 @@ ## 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. ## Credentials value encrypted with wrong auth key ![](/img/usage/value-encrypted-wrong-key.png) @@ -7,5 +7,5 @@ Due to IntelliJ version differences and usage on Windows vs. Mac OS, the run con 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). +Please follow the error message's instructions and update java to at least `1.8.0_161`. +More information about this issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size). From 550f4f5fc1ee6508bcc20a4b6973e507eb41629c Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 27 Jul 2019 11:35:14 +0200 Subject: [PATCH 05/22] Fixed typos and improved usage/Frequent-Issues.md --- usage/Frequent-Issues.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usage/Frequent-Issues.md b/usage/Frequent-Issues.md index 0a73cac..1a1b7cf 100644 --- a/usage/Frequent-Issues.md +++ b/usage/Frequent-Issues.md @@ -1,5 +1,5 @@ ## 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. ## Credentials value encrypted with wrong auth key ![](/img/usage/value-encrypted-wrong-key.png) @@ -7,5 +7,5 @@ Due to IntelliJ version differences and usage on Windows vs. Mac OS, the run con 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`. +More information about this issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size). From d9918388c9ac6838799dacfc404b79162ddf1ec1 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 19:33:52 +0200 Subject: [PATCH 06/22] Fixed typos and improved usage/Installation.md --- usage/Installation.md | 88 +++++-------------------------------------- 1 file changed, 10 insertions(+), 78 deletions(-) diff --git a/usage/Installation.md b/usage/Installation.md index 14cdd62..96f9883 100644 --- a/usage/Installation.md +++ b/usage/Installation.md @@ -1,91 +1,23 @@ -<<<<<<< HEAD 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. +[You can download it here.](https://www.java.com/en/download/) -## Windows - -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.bat`. - -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. - -## 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`. -======= ## Installation -This tutorial shows how to install the chat overflow framework. For now, working with the development environment is the only way. Currently, there are **no builds available.** - - - -### Step by step guide - -0. Install [git](https://git-scm.com/) and [Node.js](https://nodejs.org/en/download/). Make sure to add them to your PATH. To verify the install, open a console and execute `git --version` and `npm --version`. If the version number is echoed back, the installation is valid. -1. Clone the main repository using `git clone https://github.com/codeoverflow-org/chatoverflow.git`. -2. `git` created a folder named `chatoverflow`. Navigate into it using `cd chatoverflow`. -3. Clone the [api repository](https://github.com/codeoverflow-org/chatoverflow-api) into a folder named `api` using `git clone https://github.com/codeoverflow-org/chatoverflow-api.git api`. -4. Clone the [gui repository](https://github.com/codeoverflow-org/chatoverflow-gui) into a folder named `gui` using `git clone https://github.com/codeoverflow-org/chatoverflow-gui.git gui`. -5. Clone the [public plugins repository](https://github.com/codeoverflow-org/chatoverflow-plugins) into a folder named `plugins-public` using `git clone https://github.com/codeoverflow-org/chatoverflow-plugins.git plugins-public`. - Side note: You can rename the folders to your liking, but if you do change their names, update them in the main [build-file](https://github.com/codeoverflow-org/chatoverflow/blob/42b9469fe489fe5efeb4aa70f278e3558fccab7d/build.sbt#L64). - -6. Open your favorite IDE for java and scala development. We recommend using [IntelliJ IDEA](https://www.jetbrains.com/idea/). You can use the free community version as well as the ultimate version. - - Side note: The next steps assume that you are using IntelliJ IDEA. - -7. If there are any updates to either IntelliJ IDEA or the scala plugin, please install them. -8. Open the cloned `chatoverflow` folder. Make sure that IntelliJ's `auto-import` is NOT enabled. -9. Click on `Refresh sbt project`. Make sure to use a up-to-date java 1.8 SDK and do not change any other settings in the dialog window. -10. Please wait for the process to finish. In the background, 3 projects are built, resources will be downloaded and a lot of magic happens! -11. When the process has finished, you should see the project and its children in IntelliJ's project view. - - Side note: The run configurations contain a lot of sbt commands and presets for plugin development. You probably will not need more. Brief documentation can be found in the main build.sbt file. - -12. Select the run configuration `Fetch plugins (sbt fetch)` and execute it. A file named `plugins.sbt` should be generated, containing all references to plugins and the api project. -13. Use `sbt reload` (the refresh icon in the upper left corner of the sbt window, opened by View -> Tool Windows -> SBT) to reload the whole project. Now, the child projects should have been recognized correctly. -14. Have a look at the application run configurations. Do they have a red X? Then they are broken. Click on `Edit configurations` and select `root` as module ("Use classpath as module"). Now it should work, . -15. Execute the run configuration `[Advanced] Full Reload and Run ChatOverflow`. This is only needed for the first compilation or if you create a new plugin! Those are the steps that are executed now: - - * First, all target folders and the build environment is cleaned. - * Then the project is built and all plugins are fetched. The `plugins.sbt` file gets generated. After that, the whole build environment gets reloaded. - * Next, all plugin versions and the api version are printed for debug reasons. - * Finally, the plugin's compiled code gets packaged into several .JAR-Archives and they get copied into the `plugins`-folder. - * Everything is set up and the chat overflow framework gets executed. Now the framework tries to load the plugins from the `plugins`-folder. Done! +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. - - Side note: You must not re-execute this run configuration after you have changed something. Now you can just use the `[Simple]` run configuration. +2. Extract the zip file. (It's clever to extract it in a folder called chatoverflow 😉) - Yet another side note: The projects folder structure is really simple. +3. If you are on Windows, execute `ChatOverflow.bat`. If you are on an UNIX operating system like MacOS or Linux execute `ChatOverflow.sh`. - * The `api` folder contains the API-project with all common chat overflow modelling. - * The `plugins` folder contains our packaged plugins. Just leave them alone. - * The `plugins-public` folder contains all official/public chat overflow plugins. Each plugin has its own sub project. - * The `project` folder contains build code for the plugin framework. - * The `src` folder contains the chat overflow framework code. - * The `target` folder contains the built framework. ->>>>>>> a4a476b3b7fedf19f30dbb183118db3270e94fbd +4. Wait for the launcher to download all dependencies. ⏳ -4. Wait for the launcher to download all dependencies ⏳ +5. The framework will start. Have fun using it! 😃 -5. The framework will start. When executing the `ChatOverflow.sh` again it will skipp downloading the dependencies. \ No newline at end of file +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. From f858fb684aa93c59bab07f2fb5f4f0924904f692 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 19:39:28 +0200 Subject: [PATCH 07/22] Fixed typos and improved usage/Using-the-CLI.md --- usage/Using-the-CLI.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usage/Using-the-CLI.md b/usage/Using-the-CLI.md index db1efcb..2b2f3f2 100644 --- a/usage/Using-the-CLI.md +++ b/usage/Using-the-CLI.md @@ -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`. From 711c43ed438fb7f2d6f4695cae6ceea2bd6d61ad Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 19:51:46 +0200 Subject: [PATCH 08/22] Fixed typos and improved usage/Using-the-GUI.md --- usage/Using-the-GUI.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/usage/Using-the-GUI.md b/usage/Using-the-GUI.md index e5e7396..c0ed224 100644 --- a/usage/Using-the-GUI.md +++ b/usage/Using-the-GUI.md @@ -1,45 +1,45 @@ The GUI for chatoverflow is still in development. -Thats why whe have the **Better REPL**, an easy-to-use one-page dashboard, where everything can be controlled. +That's why whe have the **Better REPL**, an easy-to-use one-page dashboard, where everything can be controlled. ## Starting the Better REPL When using the GUI for the first time use the `[Advanced]` run configuration that packages the gui into the chatoverflow jar. For all further runs you may use the `[Simple]` run configuration which is way faster. -Once the framework is running open http://localhost:2400/, wait for the server status to display `Connected!` and click on `OPEN BETTER REPL`. +Once the framework is running open http://localhost:2400/ in a browser and wait for the server status to display `Connected!`. Now click on `OPEN BETTER REPL`. ![](/img/usage/login.png) When running for the first time enter a password that you want to use for securing your credentials and click on `REGISTER`. -If you have already registered, use your password to login. -If the login was successful the gui will display the authentication key for that session. +If you already are registered, use your password to login. +If the login was successful the gui will display the authentication key for this session. ## Creating a plugin instance -Before running a plugin you have to create the plugin instance. +Before running a plugin you have to create a plugin instance. All available plugins are listed under `Plugin types`. -Add more plugins by putting the plugin Jar files into the plugins folder. +Add more plugins by putting the plugin `.jar` files into the plugins folder. ![](/img/usage/plugin-types.png) -Enter the plugin name and the author of the plugin and give the instance a name (whatever you like), the click on `CREATE`: +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`: ![](/img/usage/create-plugin.png) -The plugin instance should now list under `Plugin instances`: +The plugin instance should now be listed under `Plugin instances`: ![](/img/usage/plugin-instances.png) -You can use the pen to copy an instances name. -There are buttons that allow you to `START` / `STOP` a 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). +You can use the pen to copy the name of an instance. +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). ## Setting plugin requirements Before you can start a plugin you need to set its requirements. -A plugin can require a lot of thins: Strings, Inputs or Outputs are the most often used. +A plugin can require a lot of things, for example Strings, Inputs or Outputs. To view all requirements of a plugin enter the instance name and click on `SHOW REQUIREMENTS`. ![](/img/usage/plugin-requirements.png) You see that each requirement has a type and needs a value. -You see which requirements are already set and which ones are optional (don't need to be set to start the plugin). -To set/change the value click on the blue pen, enter the requirement value and click on `PUT`. +You see which requirements are already set and which ones are optional. +To set or change the value click on the blue pen, enter the required value and click on `PUT`. ![](/img/usage/change-requirement.png) @@ -51,7 +51,7 @@ To add a connector use whatever source identifier you like, specify the connecto ![](/img/usage/create-connector.png) ## Set credentials -Every connector needs you to set the credentials for that service. +Every connector requires you to set the credentials for that service. Use the blue pen to copy the identifier and the type to the connector and then use the manage credentials field to set key and value of the credentials. ![](/img/usage/credentials.png) From e9f148bae76dee46fadf93556475fc5e0be0a63e Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 21:32:56 +0200 Subject: [PATCH 09/22] Fixed a typo in ... development/Setting-up-the-Build-Environment.md --- development/Setting-up-the-Build-Environment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 352ff4096e69f68cf7d2397908a528c0f996eee7 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 21:41:45 +0200 Subject: [PATCH 10/22] Fixed typos in ... development/Adding-a-new-platform-source.md --- development/Adding-a-new-platform-source.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/development/Adding-a-new-platform-source.md b/development/Adding-a-new-platform-source.md index 5a65e3b..12f1f5b 100644 --- a/development/Adding-a-new-platform-source.md +++ b/development/Adding-a-new-platform-source.md @@ -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*. +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. 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 From 7362d2e60ef4cdc6b6cf3e0eb966c83f5963ca4e Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 21:44:34 +0200 Subject: [PATCH 11/22] Fixed typos in ... development/Deploy-ChatOverflow.md --- development/Deploy-ChatOverflow.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/development/Deploy-ChatOverflow.md b/development/Deploy-ChatOverflow.md index 8e73129..bce5097 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 Chat Overflow framework and API version numbers before a public release. \ No newline at end of file From 12b2a9389dcba0da376c48cbc065b0d900f011b0 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 21:59:16 +0200 Subject: [PATCH 12/22] Fixed typos and improved ... development/Writing-a-plugin.md --- development/Writing-a-plugin.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/development/Writing-a-plugin.md b/development/Writing-a-plugin.md index eb5c1db..cdead82 100644 --- a/development/Writing-a-plugin.md +++ b/development/Writing-a-plugin.md @@ -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. -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). ## 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: ``` class MySuperCoolPlug extends Pluggable{ @@ -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. -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`. -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. ## 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 paramter 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'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)!* \ No newline at end of file From 820547fe25db3794d2b5de1bcc6a3f842629dc5f Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 22:06:16 +0200 Subject: [PATCH 13/22] Fixed typos in ... services/Discord.md --- services/Discord.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/Discord.md b/services/Discord.md index fd32ec5..287f713 100644 --- a/services/Discord.md +++ b/services/Discord.md @@ -1,7 +1,7 @@

-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. You can also send messages, files or even [fancy embeds](https://www.discord.club/static/home/img/embedg.png). @@ -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) From c4ecb496f2e573f427035329b45d8e5f5de2175d Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 22:09:45 +0200 Subject: [PATCH 14/22] Fixed typos in ... services/Serial.md --- services/Serial.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/Serial.md b/services/Serial.md index 0181ef2..9481181 100644 --- a/services/Serial.md +++ b/services/Serial.md @@ -1,6 +1,6 @@

-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. The most common example is exchanging data with an [arduino](https://www.arduino.cc/) over USB. @@ -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; From f8da87f24f77a93f8f2227e662e8a45064967f63 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Wed, 31 Jul 2019 22:15:04 +0200 Subject: [PATCH 15/22] Fixed typos in ... services/Twitch-Chat.md --- services/Twitch-Chat.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/Twitch-Chat.md b/services/Twitch-Chat.md index 7fb8581..1380d65 100644 --- a/services/Twitch-Chat.md +++ b/services/Twitch-Chat.md @@ -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. 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._ From 38024c510d04744ce66dc9fee743382929ab4b96 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 1 Aug 2019 10:01:09 +0200 Subject: [PATCH 16/22] Update development/Writing-a-plugin.md Co-Authored-By: Daniel Huber --- development/Writing-a-plugin.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/development/Writing-a-plugin.md b/development/Writing-a-plugin.md index cdead82..d3f6ad9 100644 --- a/development/Writing-a-plugin.md +++ b/development/Writing-a-plugin.md @@ -54,7 +54,7 @@ class MySuperCoolPlugin(manager: PluginManager) extends PluginImpl(manager) { } ``` -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. +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 an example: @@ -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 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)!* \ No newline at end of file +*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)!* From 8f45891565fe1f183b5eb511d41e8cd144095e2e Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 1 Aug 2019 10:03:07 +0200 Subject: [PATCH 17/22] Update development/Writing-a-plugin.md Co-Authored-By: Daniel Huber --- development/Writing-a-plugin.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/development/Writing-a-plugin.md b/development/Writing-a-plugin.md index d3f6ad9..f7a8cbb 100644 --- a/development/Writing-a-plugin.md +++ b/development/Writing-a-plugin.md @@ -19,7 +19,7 @@ Next, add your first class to the source folder of the new plugin. Supported lan 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: ``` -class MySuperCoolPlug extends Pluggable{ +class MySuperCoolPlug extends Pluggable { override def getName: String = ??? From b2661939f9132749d529e4830925ef3bb7f980f1 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Thu, 1 Aug 2019 10:09:22 +0200 Subject: [PATCH 18/22] Improved usage/Using-the-GUI.md Added some suggestion from daniel0611. --- usage/Using-the-GUI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/Using-the-GUI.md b/usage/Using-the-GUI.md index c0ed224..5f9c345 100644 --- a/usage/Using-the-GUI.md +++ b/usage/Using-the-GUI.md @@ -16,7 +16,7 @@ If the login was successful the gui will display the authentication key for this ## Creating a plugin instance Before running a plugin you have to create a plugin instance. All available plugins are listed under `Plugin types`. -Add more plugins by putting the plugin `.jar` files into the plugins folder. +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. ![](/img/usage/plugin-types.png) From f849f5e38e9b2d79ba96b0343d20264488195504 Mon Sep 17 00:00:00 2001 From: Andreas Date: Thu, 1 Aug 2019 10:15:01 +0200 Subject: [PATCH 19/22] Update usage/Using-the-CLI.md Co-Authored-By: Daniel Huber --- usage/Using-the-CLI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/Using-the-CLI.md b/usage/Using-the-CLI.md index 2b2f3f2..a2fe3d6 100644 --- a/usage/Using-the-CLI.md +++ b/usage/Using-the-CLI.md @@ -40,4 +40,4 @@ The combination of logging in and starting plugins with one command is very usef -l myPassword -s startupPluginInstance1,startupPluginInstance2 ``` -By default the output of a plugin is disabled. You can enable it with the flag `-o`. +By default the log output of a plugin on the console is disabled. You can enable it with the flag `-o`. From d5297f89c383a4b973bfd2520b0e3f0715ee7a49 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 3 Aug 2019 11:16:47 +0200 Subject: [PATCH 20/22] 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. --- development/Adding-a-new-platform-source.md | 2 +- development/Deploy-ChatOverflow.md | 2 +- development/Writing-a-plugin.md | 16 ++++++++-------- services/Discord.md | 2 +- services/Serial.md | 2 +- services/Twitch-Chat.md | 12 ++++++------ usage/Frequent-Issues.md | 8 ++++---- usage/Installation.md | 4 ++-- usage/Using-the-GUI.md | 6 +++--- 9 files changed, 27 insertions(+), 27 deletions(-) diff --git a/development/Adding-a-new-platform-source.md b/development/Adding-a-new-platform-source.md index 12f1f5b..554f46c 100644 --- a/development/Adding-a-new-platform-source.md +++ b/development/Adding-a-new-platform-source.md @@ -1,4 +1,4 @@ -Thank you for helping developing *Chat Overflow*. +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. By this measure, we can make sure that everyone profits from the same features. This wiki entry tries to show you the different steps needed to implement a new connection. diff --git a/development/Deploy-ChatOverflow.md b/development/Deploy-ChatOverflow.md index bce5097..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 numbers 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/Writing-a-plugin.md b/development/Writing-a-plugin.md index f7a8cbb..e297d70 100644 --- a/development/Writing-a-plugin.md +++ b/development/Writing-a-plugin.md @@ -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* 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. +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 as well as a 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 through 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 { @@ -36,11 +36,11 @@ class MySuperCoolPlug extends Pluggable { ``` -**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. +**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'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`. +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 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. +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 @@ -64,7 +64,7 @@ private val twitchChatInput = require.input.twitchChat("reqTwitch", "A twitch ch private val nameToSayHelloTo = require.parameter.string("reqHello", "Your name", false) ``` -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`. +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 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. @@ -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 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)!* +*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 287f713..15bf7f0 100644 --- a/services/Discord.md +++ b/services/Discord.md @@ -1,7 +1,7 @@

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. +react on new, edited or deleted messages as well as reactions. You can also send messages, files or even [fancy embeds](https://www.discord.club/static/home/img/embedg.png). diff --git a/services/Serial.md b/services/Serial.md index 9481181..cac3be3 100644 --- a/services/Serial.md +++ b/services/Serial.md @@ -1,6 +1,6 @@

-The Serial service allows you 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. The most common example is exchanging data with an [arduino](https://www.arduino.cc/) over USB. diff --git a/services/Twitch-Chat.md b/services/Twitch-Chat.md index 1380d65..9fa20e6 100644 --- a/services/Twitch-Chat.md +++ b/services/Twitch-Chat.md @@ -1,17 +1,17 @@

-The twitch chat service allows plugins to connect to a channels chat by using IRC. +The Twitch chat service allows plugins to connect to a channels chat by using IRC. They can get a List of recent messages, listen for new messages or send messages to the chat. ## 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. If you don't have such a token yet you can generate it on https://twitchapps.com/tmi/. -Just log into your twitch account and copy the token. +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._ @@ -32,7 +32,7 @@ import org.codeoverflow.chatoverflow.api.io.event.chat.twitch.TwitchChatMessageR import org.codeoverflow.chatoverflow.api.io.dto.chat.twitch.TwitchChatMessage; public class TestPlugin extends PluginImpl { - //require a new twitch chat input + //require a new Twitch chat input private Requirement twitchIn = require.input.twitchChat("twitchChat", "The Twitch chat", false); @@ -96,7 +96,7 @@ import org.codeoverflow.chatoverflow.api.plugin.PluginImpl; import org.codeoverflow.chatoverflow.api.plugin.PluginManager; public class TestPlugin extends PluginImpl { - //require a new twitch chat output + //require a new Twitch chat output private Requirement twitchOut = require.output.twitchChat("twitchChat", "The Twitch chat", false); @@ -119,7 +119,7 @@ public class TestPlugin extends PluginImpl { + LocalTime.now().format(DateTimeFormatter.ISO_LOCAL_TIME) + " Uhr!"; log(timeMessage); - //Output the message to the twitch chat + //Output the message to the Twitch chat twitchOut.get().sendChatMessage(timeMessage); } diff --git a/usage/Frequent-Issues.md b/usage/Frequent-Issues.md index 1a1b7cf..6f31c2e 100644 --- a/usage/Frequent-Issues.md +++ b/usage/Frequent-Issues.md @@ -1,11 +1,11 @@ ## Run Configuration Bug -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. +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. ## 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 +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. -To fix this error you have to update java 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. +To fix this error you have to update Java to version `1.8.0_161` or later. More information about this issue can be found [on stackoverflow.com](https://stackoverflow.com/questions/3862800/invalidkeyexception-illegal-key-size). diff --git a/usage/Installation.md b/usage/Installation.md index 96f9883..9275ef4 100644 --- a/usage/Installation.md +++ b/usage/Installation.md @@ -4,8 +4,8 @@ head over to [Build Environment](development/Setting-up-the-Build-Environment.md ## Prerequisites -For running Chatoverflow you will need Java 8, version `1.8.0_161` or newer. -[You can download it here.](https://www.java.com/en/download/) +For running Chatoverflow you will need Java 8, version `1.8.0_161` or later. +You can download it [here].(https://www.java.com/en/download/) ## Installation diff --git a/usage/Using-the-GUI.md b/usage/Using-the-GUI.md index 5f9c345..f4d6c0f 100644 --- a/usage/Using-the-GUI.md +++ b/usage/Using-the-GUI.md @@ -16,11 +16,11 @@ If the login was successful the gui will display the authentication key for this ## Creating a plugin instance Before running a plugin you have to create a plugin instance. All available plugins are listed under `Plugin types`. -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. +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. ![](/img/usage/plugin-types.png) -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`: +Enter the plugin and author name of the plugin and give the instance a name (whatever you like), then click on `CREATE`: ![](/img/usage/create-plugin.png) @@ -29,7 +29,7 @@ The plugin instance should now be listed under `Plugin instances`: ![](/img/usage/plugin-instances.png) You can use the pen to copy the name of an instance. -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). +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). ## Setting plugin requirements Before you can start a plugin you need to set its requirements. From 6233e4eb10f35eae276bdd01077748b6db1c164d Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Sat, 3 Aug 2019 11:44:38 +0200 Subject: [PATCH 21/22] Fixed famous line 3 in Adding platform source! As well as a small change in Using-the-Gui.md --- development/Adding-a-new-platform-source.md | 3 ++- usage/Using-the-GUI.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/development/Adding-a-new-platform-source.md b/development/Adding-a-new-platform-source.md index 554f46c..588bf49 100644 --- a/development/Adding-a-new-platform-source.md +++ b/development/Adding-a-new-platform-source.md @@ -1,6 +1,7 @@ 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. -By this measure, we can make sure that everyone profits from the same features. + +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) diff --git a/usage/Using-the-GUI.md b/usage/Using-the-GUI.md index f4d6c0f..b4d258c 100644 --- a/usage/Using-the-GUI.md +++ b/usage/Using-the-GUI.md @@ -10,7 +10,7 @@ Once the framework is running open http://localhost:2400/ in a browser and wait ![](/img/usage/login.png) When running for the first time enter a password that you want to use for securing your credentials and click on `REGISTER`. -If you already are registered, use your password to login. +If you are already registered, use your password to login. If the login was successful the gui will display the authentication key for this session. ## Creating a plugin instance From c254a8c55d056a9d7dab5e0c072ea4c0346ac240 Mon Sep 17 00:00:00 2001 From: DragonCoder01 Date: Thu, 8 Aug 2019 17:25:20 +0200 Subject: [PATCH 22/22] Improved Frequent-Issues.md Added name of the root module --- usage/Frequent-Issues.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usage/Frequent-Issues.md b/usage/Frequent-Issues.md index 6f31c2e..9889b66 100644 --- a/usage/Frequent-Issues.md +++ b/usage/Frequent-Issues.md @@ -1,5 +1,5 @@ ## Run Configuration Bug -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. +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 (`chatoverflow`). Now everything should be working fine again. ## Credentials value encrypted with wrong auth key ![](/img/usage/value-encrypted-wrong-key.png)