Skip to content

eoctet/accordion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accordion 🪗

CI Maven Central README Zh_CN

Accordion is an automated task framework. You can combine multiple actions to achieve an efficient automation task, just like the IFTTT simple and straightforward, quickly improving the efficiency of your system.

Supported actions

Action Description
💡 API Calling third-party Restful APIs.
⚙️ Condition Logical judgment of combination conditions and single conditions.
🔗 Switch Multi-branch link execution.
✉️ Email You can send custom emails.
📝 Script Execute custom scripts.
💻 Shell Execute custom command line.
🤖 LlamaAI Generate dialogue and continuation text using Llama AI.
▶️ Test Special actions used for testing.

Quick start

Create your own project and use Maven or Gradle to import the accordion framework.

For the latest version, check out GitHub Release or search the Maven repository.

Maven

<dependency>
    <groupId>chat.octet</groupId>
    <artifactId>accordion</artifactId>
    <version>LAST_RELEASE_VERSION</version>
</dependency>

Gradle

implementation group: 'chat.octet', name: 'accordion', version: 'LAST_RELEASE_VERSION'

Examples

Another simple example of Hello world

public class HelloWorld {

    public static void main(String[] args) {
        ActionConfig myAction = ActionConfig.builder()
                .id(CommonUtils.randomString("ACT").toUpperCase())
                .actionType(ActionType.SCRIPT.name())
                .actionName("My action")
                .actionDesc("My first action example")
                .actionParams(ScriptParameter.builder().script("println('Hello world')").build())
                .build();

        AccordionPlan plan = AccordionPlan.of().start(myAction);
        try (Accordion accordion = new Accordion(plan)) {
            accordion.play(true);
            System.out.println("Accordion plan:\n" + accordion.verbose());
        }
    }
}
Hello world
... ...

Accordion plan:
🅞───⨀ ✅ My Action (ACT-WD4J1ZK2IU)

Tip

More examples: chat.octet.accordion.examples.*

Documentation

Feedback

  • If you have any questions, please submit them in GitHub Issue.