Implementation of the "open" command that uses Syndicate and PCRE pattern matching to open URIs.
Go to file
Emery Hemingway 74f267740a Syndicate API update 2023-10-21 18:52:59 +01:00
src Syndicate API update 2023-10-21 18:52:59 +01:00
.envrc Better build system 2023-06-07 18:15:23 +01:00
.gitignore Add lockfile 2023-10-10 09:04:43 +01:00
README.md Syndicate API update 2023-10-21 18:52:59 +01:00
Tupfile Syndicate API update 2023-10-21 18:52:59 +01:00
Tuprules.tup Add lockfile 2023-10-10 09:04:43 +01:00
handlers-example.pr Rename to "open", decompose URIs in assertions 2023-06-30 15:26:22 +01:00
lock.json Syndicate API update 2023-10-21 18:52:59 +01:00
protocol.prs Rename to "open", decompose URIs in assertions 2023-06-30 15:26:22 +01:00
shell.nix Add lockfile 2023-10-10 09:04:43 +01:00
syndicated_open.nimble Syndicate API update 2023-10-21 18:52:59 +01:00
uri_runner.pr Adjust to Syndicate API 2023-10-10 09:04:59 +01:00

README.md

Syndicated Open

An open command implementation that uses Syndicate and PCRE pattern matching to open URIs.

There are two utilites, open and uri_runner. The former connects to a shared Syndicate dataspace using a route at $SYNDICATE_ROUTE and has no other configuration. The uri_runner component is intended to be managed by the Syndicate server thru which it receives configuration, see uri_runner.pr as an example.

Matching patterns to actions is done with action-handler records:

<action-handler "foo://(.*):(.*)" $entity <krempel ["--host=$1" "--port=$2"]> >

In the preceding example the URI foo://bar:42 would cause the message <krempel ["--host=bar" "--port=42"]> to be sent to $entity.

See handlers-example.pr for more information.

The protocol.nim file is generated from the protocol.prs schema, a Tupfile file is provided to do this.