From 3023e37f4873ec7d02f2416bbaa3f10dc3b23689 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 3 Dec 2025 23:28:04 -0600 Subject: [PATCH] basic processor documentation layout --- astro.config.mjs | 15 +++++++++++++++ src/content/docs/processors/osc/decode.md | 13 +++++++++++++ src/content/docs/processors/osc/encode.md | 13 +++++++++++++ src/content/docs/processors/string/create.md | 16 ++++++++++++++++ src/content/docs/processors/string/decode.md | 13 +++++++++++++ src/content/docs/processors/string/encode.md | 13 +++++++++++++ 6 files changed, 83 insertions(+) create mode 100644 src/content/docs/processors/osc/decode.md create mode 100644 src/content/docs/processors/osc/encode.md create mode 100644 src/content/docs/processors/string/create.md create mode 100644 src/content/docs/processors/string/decode.md create mode 100644 src/content/docs/processors/string/encode.md diff --git a/astro.config.mjs b/astro.config.mjs index e993bd5..06a3596 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -42,6 +42,21 @@ export default defineConfig({ }, ] }, + { + label: 'Processors', + items: [ + { + label: "OSC", + collapsed: true, + autogenerate: { directory: 'processors/osc' } + }, + { + label: "String", + collapsed: true, + autogenerate: { directory: 'processors/string' } + }, + ] + }, { label: 'Examples', autogenerate: { directory: 'examples' }, diff --git a/src/content/docs/processors/osc/decode.md b/src/content/docs/processors/osc/decode.md new file mode 100644 index 0000000..ba0e29c --- /dev/null +++ b/src/content/docs/processors/osc/decode.md @@ -0,0 +1,13 @@ +--- +title: Decode +sidebar: + order: 1 +--- +The osc decode module takes a array of bytes and turn it into OSC message if it can be. This processor will return an error if the bytes cannot be parsed as an OSC message + +- **type**: `osc.message.decode` + +### Example +``` +- type: osc.message.encode +``` \ No newline at end of file diff --git a/src/content/docs/processors/osc/encode.md b/src/content/docs/processors/osc/encode.md new file mode 100644 index 0000000..0d68344 --- /dev/null +++ b/src/content/docs/processors/osc/encode.md @@ -0,0 +1,13 @@ +--- +title: Encode +sidebar: + order: 1 +--- +The osc encode module takes an OSC message and turns it into an array of bytes. This processor will return an error if the OSC message cannot be turned into bytes. + +- **type**: `osc.message.encode` + +### Example +``` +- type: osc.message.encode +``` \ No newline at end of file diff --git a/src/content/docs/processors/string/create.md b/src/content/docs/processors/string/create.md new file mode 100644 index 0000000..1ef8637 --- /dev/null +++ b/src/content/docs/processors/string/create.md @@ -0,0 +1,16 @@ +--- +title: Create +sidebar: + order: 1 +--- +The string create processor creates a string based on the provided template. This processor will return an error if there is an issue executing the template. The template property is just a [Go template](https://pkg.go.dev/text/template) that will be evaluated with the incoming message provided as an environment. + +- **type**: `string.create` + +### Example +This would create a string using the `Address` property of the incoming message like and OSC message +``` +- type: string.create + params: + template: "{{.Address}} +``` \ No newline at end of file diff --git a/src/content/docs/processors/string/decode.md b/src/content/docs/processors/string/decode.md new file mode 100644 index 0000000..f95c6f9 --- /dev/null +++ b/src/content/docs/processors/string/decode.md @@ -0,0 +1,13 @@ +--- +title: Decode +sidebar: + order: 1 +--- +The string decode processor takes a array of bytes and turn it into string. This processor will return an error if the message being processed is not an array of bytes. + +- **type**: `string.decode` + +### Example +``` +- type: string.decode +``` \ No newline at end of file diff --git a/src/content/docs/processors/string/encode.md b/src/content/docs/processors/string/encode.md new file mode 100644 index 0000000..c1e009e --- /dev/null +++ b/src/content/docs/processors/string/encode.md @@ -0,0 +1,13 @@ +--- +title: Encode +sidebar: + order: 1 +--- +The string encode processor takes a string and turns it into an array of bytes. This processor will return an error if the message being processed is not a string. + +- **type**: `string.encode` + +### Example +``` +- type: string.encode +``` \ No newline at end of file