essential-actions
Clone or download
Modified Files
--- 'a/README.md'
+++ b/README.md
@@ -1,6 +1,6 @@
# Stream-Pi Essential Actions
-Set of trusted, pre-bundled actions and integrations for Stream-Pi using the [Stream-Pi Action API](https://github.com/stream-pi/action-api).
+Set of trusted, essential actions and integrations for Stream-Pi using the [Stream-Pi Action API](https://github.com/stream-pi/action-api). These actions are prebundled with public Stream-Pi releases.
## Prerequisites
@@ -16,6 +16,7 @@ Set of trusted, pre-bundled actions and
- Run Command
- Text Block
- Twitch Chat
+- Open File
- Twitter
- Website
--- 'a/build.bat'
+++ b/build.bat
@@ -8,15 +8,16 @@ mkdir %FOLD%
copy %DEPS%\* %FOLD%\
-if "%1%"=="Hotkey" (goto Hotkey)
-if "%1%"=="MediaKey" (goto MediaKey)
-if "%1%"=="ObsSuite" (goto ObsSuite)
-if "%1%"=="PlayAudioClip" (goto PlayAudioClip)
-if "%1%"=="RunCommand" (goto RunCommand)
-if "%1%"=="TextBlock" (goto TextBlock)
-if "%1%"=="TwitchChat" (goto TwitchChat)
-if "%1%"=="Twitter" (goto Twitter)
-if "%1%"=="Website" (goto Website)
+if "%1%"=="hotkeyaction" (goto hotkeyaction)
+if "%1%"=="mediakeyaction" (goto mediakeyaction)
+if "%1%"=="obssuite" (goto obssuite)
+if "%1%"=="playaudioclipaction" (goto playaudioclipaction)
+if "%1%"=="runcommandaction" (goto runcommandaction)
+if "%1%"=="textblockaction" (goto textblockaction)
+if "%1%"=="twitch" (goto twitch)
+if "%1%"=="twitteraction" (goto twitteraction)
+if "%1%"=="websiteaction" (goto websiteaction)
+if "%1%"=="openfileaction" (goto openfileaction)
if NOT "%1%"=="" (
echo Invalid argument %1%
@@ -25,17 +26,18 @@ if NOT "%1%"=="" (
set quit=false
-goto Hotkey
-goto MediaKey
-goto ObsSuite
-goto PlayAudioClip
-goto RunCommand
-goto TextBlock
-goto TwitchChat
-goto Twitter
-goto Website
+goto hotkeyaction
+goto mediakeyaction
+goto obssuite
+goto playaudioclipaction
+goto runcommandaction
+goto textblockaction
+goto twitch
+goto twitteraction
+goto websiteaction
+goto openfileaction
-:Hotkey
+:hotkeyaction
pushd %CD%
cd hotkeyaction
call mvn clean -Dmaven.test.skip package
@@ -43,7 +45,7 @@ move target\hotkeyaction-*.jar ..\%FOLD%
popd
if "%quit%" == "true" (EXIT /B 0)
-:MediaKey
+:mediakeyaction
pushd %CD%
cd mediakeyaction
call mvn clean -Dmaven.test.skip package
@@ -51,7 +53,7 @@ move target\mediakeyaction-*.jar ..\%FOL
popd
if "%quit%" == "true" (EXIT /B 0)
-:ObsSuite
+:obssuite
pushd %CD%
cd obssuite\mother
CALL mvn clean install -Dmaven.test.skip package
@@ -103,7 +105,7 @@ move target\obssuite_setvolumeaction-*.j
popd
if "%quit%" == "true" (EXIT /B 0)
-:PlayAudioClip
+:playaudioclipaction
pushd %CD%
cd playaudioclipaction
call mvn clean -Dmaven.test.skip package
@@ -111,7 +113,7 @@ move target\playaudioclipaction-*.jar ..
popd
if "%quit%" == "true" (EXIT /B 0)
-:RunCommand
+:runcommandaction
pushd %CD%
cd runcommandaction
call mvn clean -Dmaven.test.skip package
@@ -119,7 +121,7 @@ move target\runcommandaction-*.jar ..\%F
popd
if "%quit%" == "true" (EXIT /B 0)
-:TextBlock
+:textblockaction
pushd %CD%
cd textblockaction
call mvn clean -Dmaven.test.skip package
@@ -127,7 +129,7 @@ move target\textblockaction-*.jar ..\%FO
popd
if "%quit%" == "true" (EXIT /B 0)
-:TwitchChat
+:twitch
pushd %CD%
cd twitch\twitch-chat-connect
CALL mvn clean install -Dmaven.test.skip package
@@ -183,7 +185,7 @@ move target\twitch-slow-mode-*.jar ..\..
popd
if "%quit%" == "true" (EXIT /B 0)
-:Twitter
+:twitteraction
pushd %CD%
cd twitteraction
call mvn clean -Dmaven.test.skip package
@@ -191,7 +193,7 @@ move target\twitteraction-*.jar ..\%FOLD
popd
if "%quit%" == "true" (EXIT /B 0)
-:Website
+:websiteaction
pushd %CD%
cd websiteaction
call mvn clean -Dmaven.test.skip package
@@ -199,17 +201,9 @@ move target\websiteaction-*.jar ..\%FOLD
popd
if "%quit%" == "true" (EXIT /B 0)
-:gitclone
+:openfileaction
pushd %CD%
-cd gitclone
-call mvn clean -Dmaven.test.skip package
-move target\gitclone-*.jar ..\%FOLD%\gitclone.jar
-popd
-if "%quit%" == "true" (EXIT /B 0)
-
-:openfile
-pushd %CD%
-cd openfile
+cd openfileaction
call mvn clean -Dmaven.test.skip package
move target\openfile-*.jar ..\%FOLD%\openfile.jar
popd
--- 'a/openfile/pom.xml'
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <groupId>com.stream-pi</groupId>
- <artifactId>openfile</artifactId>
- <version>1.0.0</version>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
- <executions>
- <execution>
- <id>test-jar</id>
- <phase>package</phase>
- <goals>
- <goal>test-jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.8.1</version>
- <configuration>
- <release>11</release>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <properties>
- <ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
-
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <maven.compiler.source>11</maven.compiler.source>
- <maven.compiler.target>11</maven.compiler.target>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>com.stream-pi</groupId>
- <artifactId>action-api</artifactId>
- <version>${ActionAPIVersion}</version>
- </dependency>
- </dependencies>
-</project>
\ No newline at end of file
--- 'a/openfile/src/main/java/com/stream_pi/openfile/OpenFile.java'
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.stream_pi.openfile;
-
-import com.stream_pi.action_api.actionproperty.property.*;
-import com.stream_pi.action_api.externalplugin.NormalAction;
-import com.stream_pi.util.exception.MinorException;
-import com.stream_pi.util.alert.StreamPiAlert;
-import com.stream_pi.util.alert.StreamPiAlertType;
-import com.stream_pi.util.version.Version;
-
-import java.io.File;
-import java.awt.*;
-import java.net.URI;
-import java.io.IOException;
-
-public class OpenFile extends NormalAction
-{
- public OpenFile()
- {
- setName("Open Files");
- setAuthor("quimodotcom");
- setHelpLink("https://github.com/stream-pi/essentialactions");
- setVersion(new Version(1,0,0));
- setServerButtonGraphic("fas-folder-open");
- setCategory("Essentials");
- }
-
- @Override
- public void initProperties() throws MinorException
- {
- Property fileLocationProperty = new StringProperty("file_location");
- fileLocationProperty.setControlType(ControlType.FILE_PATH);
- fileLocationProperty.setDisplayName("Document File Location");
- fileLocationProperty.setExtensionFilters(
- new FileExtensionFilter("File","*.*")
- );
-
- addClientProperties(fileLocationProperty);
- }
-
- @Override
- public void onActionClicked() throws MinorException
- {
- showFile();
- }
-
- public void showFile() throws MinorException
- {
- Property fileLocation = getClientProperties().getSingleProperty("file_location");
-
- if (fileLocation.getStringValue().isBlank())
- {
- throw new MinorException("No file specified");
- }
-
- File file = new File(fileLocation.getStringValue());
-
- try
- {
- Desktop.getDesktop().open(file);
- }
- catch (IOException e)
- {
- throw new MinorException("Unable to open file : "+fileLocation.getStringValue()+"\n" +
- "Reason:\n"+e.getMessage());
- }
- }
-}
--- 'a/openfile/src/main/java/module-info.java'
+++ /dev/null
@@ -1,9 +0,0 @@
-module com.stream_pi.openfile
-{
- requires com.stream_pi.action_api;
- requires org.kordamp.ikonli.javafx;
-
- requires java.desktop;
-
- provides com.stream_pi.action_api.externalplugin.ExternalPlugin with com.stream_pi.openfile.OpenFile;
-}
\ No newline at end of file
--- /dev/null
+++ b/openfileaction/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>com.stream-pi</groupId>
+ <artifactId>openfileaction</artifactId>
+ <version>1.0.0</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>3.1.0</version>
+ <executions>
+ <execution>
+ <id>test-jar</id>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.8.1</version>
+ <configuration>
+ <release>11</release>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <ActionAPIVersion>1.0.0-SNAPSHOT</ActionAPIVersion>
+
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <maven.compiler.source>11</maven.compiler.source>
+ <maven.compiler.target>11</maven.compiler.target>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.stream-pi</groupId>
+ <artifactId>action-api</artifactId>
+ <version>${ActionAPIVersion}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+++ b/openfileaction/src/main/java/com/stream_pi/openfileaction/OpenFileAction.java
@@ -0,0 +1,67 @@
+package com.stream_pi.openfileaction;
+
+import com.stream_pi.action_api.actionproperty.property.*;
+import com.stream_pi.action_api.externalplugin.NormalAction;
+import com.stream_pi.util.exception.MinorException;
+import com.stream_pi.util.alert.StreamPiAlert;
+import com.stream_pi.util.alert.StreamPiAlertType;
+import com.stream_pi.util.version.Version;
+
+import java.io.File;
+import java.awt.*;
+import java.net.URI;
+import java.io.IOException;
+
+public class OpenFileAction extends NormalAction
+{
+ public OpenFileAction()
+ {
+ setName("Open Files");
+ setAuthor("quimodotcom");
+ setHelpLink("https://github.com/stream-pi/essentialactions");
+ setVersion(new Version(1,0,0));
+ setServerButtonGraphic("fas-folder-open");
+ setCategory("Essentials");
+ }
+
+ @Override
+ public void initProperties() throws MinorException
+ {
+ Property fileLocationProperty = new StringProperty("file_location");
+ fileLocationProperty.setControlType(ControlType.FILE_PATH);
+ fileLocationProperty.setDisplayName("Document File Location");
+ fileLocationProperty.setExtensionFilters(
+ new FileExtensionFilter("File","*.*")
+ );
+
+ addClientProperties(fileLocationProperty);
+ }
+
+ @Override
+ public void onActionClicked() throws MinorException
+ {
+ showFile();
+ }
+
+ public void showFile() throws MinorException
+ {
+ Property fileLocation = getClientProperties().getSingleProperty("file_location");
+
+ if (fileLocation.getStringValue().isBlank())
+ {
+ throw new MinorException("No file specified");
+ }
+
+ File file = new File(fileLocation.getStringValue());
+
+ try
+ {
+ Desktop.getDesktop().open(file);
+ }
+ catch (IOException e)
+ {
+ throw new MinorException("Unable to open file : "+fileLocation.getStringValue()+"\n" +
+ "Reason:\n"+e.getMessage());
+ }
+ }
+}
--- /dev/null
+++ b/openfileaction/src/main/java/module-info.java
@@ -0,0 +1,9 @@
+module com.stream_pi.openfileaction
+{
+ requires com.stream_pi.action_api;
+ requires org.kordamp.ikonli.javafx;
+
+ requires java.desktop;
+
+ provides com.stream_pi.action_api.externalplugin.ExternalPlugin with com.stream_pi.openfileaction.OpenFileAction;
+}
\ No newline at end of file