Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trunk Recorder Pro plugin template

A starting point for a Trunk Recorder Pro plugin in Rust: a working example plugin, tests, CI, and a release workflow that builds for every platform the recorder runs on.

A plugin is a small program of its own. The recorder starts it, tells it what happens (a call starts, a recorded call lands on disk, a radio registers, …), and stops it. Plugins watch; they don't change what gets recorded. Uploaders (OpenMHz, Broadcastify), streamers, loggers and notifiers are all plugins.

The example here, call-log, writes a line of JSON for every recorded call. For complete plugins built from this template, see the OpenMHz, Broadcastify and Rdio Scanner uploaders, simplestream (live audio) and upload-script.

Quick start

  1. Use this template on GitHub (or copy it) to make your plugin's repository.
  2. In Cargo.toml, set name (your plugin's id), description, repository and authors. In src/main.rs, set the display name in manifest(). Delete docs/ (it stays here, up to date) and rewrite this README for your plugin's users. Getting started has the full list.
  3. Build and look at what the recorder will see:
    cargo build
    ./target/debug/call-log --describe
  4. Run it against calls you've already recorded:
    trunk-pro plugin run ./target/debug/call-log ~/TrunkRecorderPro --limit 5
  5. Replace the example with your plugin, and keep the tests passing: cargo test.
  6. Tag a release (git tag v0.1.0 && git push --tags); the workflow builds it for Linux, macOS and Windows. Then submit it to the registry.

Documentation

Getting started From this template to a plugin running in your recorder
How plugins work The process, its lifecycle, threads, failures
Settings Config structs and the settings form drawn from them
Events Everything a plugin can subscribe to, field by field
Audio WAV and M4A, and what to do when M4A isn't there
Writing an uploader Keys, retries, requests: a plugin that sends calls to a service
Testing Unit tests, and running against real calls
Releasing Versions, the release workflow, platforms
The plugin registry How plugins get listed, installed and updated
Protocol The wire format, for plugins in other languages

The SDK's API reference is on docs.rs/trunk-recorder-plugin.

License

The template is MIT-licensed; your plugin can use any license you like.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages