2. Setting Up Your Environment
After you have come up with an idea, all you have to do is put it into practice.
To develop StreamController plugins you need the source code of StreamController itself.
This allows you to deeply integrate your plugin into the application.
Note
Should your plugin require modification of the code of StreamController, you will need to open a pull request. Just make sure that all requested changes outside of your plugin are generic ones and not specific to your plugin.
1. Clone StreamController:¶
Clone StreamController from GitHub by typing:
2. Enter the StreamController
directory:¶
3. Create a virtual environment:¶
4. Activate the virtual environment:¶
5. Install pip requirements:¶
6. Change the data path¶
StreamController normally stores data in the ~/.streamcontroller
directory. For development however it is useful to change the path to a directory inside the cloned repository. I recommend using creating a data
directory in the root of the repository.
Create the directory:
Set the value of DATA_PATH
to data
using:
Note
If you have installed StreamController for your personal use as a Flatpak, this will not affect the data path of your Flatpak.
6 Enter the plugins directory:¶
7. Create a plugin repository by using the Plugin Template:¶
Head over to GitHub and click on the green Use this template
button. Follow the instructions.
The next step is to clone the newly created repository:
This will create a new directory calledplugin-template
in the plugins directory with a bunch of files. But no worry, I will explain each of them in the next section.
8. Rename the PluginTemplate
directory:¶
Note
The plugin name should be in reverse domain notation, but with underscores instead of periods. For example, com_example_plugin
. You have to use underscores because python cannot handle periods in file and directory names.