Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Scripts

Phillip Rafail Papadakis edited this page Feb 6, 2025 · 2 revisions

This guide explains the usability and the configuration of scripts in the aw-plugin-scripts.yaml file.

Scripts Overview

Script plugin allows you to run external scripts that can take in stdin the ActivityWatch Records in a JSON format and return the modified data to the stdout.

Configuration Format

Scripts:
  - Script:
    name: "<Script Slug>"
    path: "<Absolute Path>"
    timeout: <Timeout In Seconds>

Script Field Descriptions

Field Description Default Value
name The name/description of the job
path The absolute path of the script
timeout The time(in seconds) that the agent will wait for the response for a specific script 30 seconds

Scripts Example

Scripts:
  - Script:
    name: "Modify Data"
    path: "/home/me/myScripts/scripts/modify.sh"
    timeout: 10
  - Script:
    name: "Mask Data"
    path: "/home/me/myScripts/scripts/mask.py"
    timeout: 30

Note

  • The name field is not mandatory but is suggested for workflow overview and logging.
  • The timeout field is in seconds.

Clone this wiki locally