Skip to content

In short, it allows for kinda clever text send macro templates that dynamically read other files for replacements.

License

Notifications You must be signed in to change notification settings

steinerd/Loupedeck.TextTemplatePlugin

Repository files navigation

TextTemplate Loupedeck Plugin

License forks stars issues downloads

This is a product of a question posed on a Loupedeck FB Group.

In short, it allows for kinda clever text send macro templates that dynamically read other files for replacements.


Table of Contents

Installation

Loupedeck Installation
  1. Go to latest release, and download the lplug4 file to you computer
  2. Open (normally double-click) to install, the Loupedeck software should take care of the rest
  3. Restart Loupedeck (if not handled by the installer)
  4. In the Loupedeck interface, enable TextTemplate by clicking Manage plugins
  5. Check the TextTemplate box on to enable
  6. Drag the desired control onto your layout

Once click it will bring you to a dynamic playback device selection page.

IDE Installation Made with Visual Studio 2022, C# will likely only compile in VS2019 or greater.

Assuming Loupedeck is already installed on your machine, make sure you've stopped it before you debug the project.

Debugging should build the solution, which will then output the DLL, config, and pdb into your %LocalAppData%\Loupedeck\Plugins directory.

If all goes well, Loupedeck will then open and you can then debug.

Usage

Follow the Loupedeck Installation instructions above.

Check out the Example Template File.

The important pieces are, the Template section at the top, which can be multiple lines. The text send will emulate a return/enter key press for every line.

I realize that the same-file replacement seems pointless, but it might be useful to an automation that writes to the template file... idk.

The the fileRef# examples are a little complex.

Firstly, any file-ref secion will have to start with file or it will be treated the same as an in-file replacement.

I'm using Newtonsoft's SelectToken via JSONPath (click here to learn more).

I'm also using it to convert XML to JSON so the same method can be used for those file types.

Important; if your XML document has a <?xml version ... ?> header, you will have to traverse from $.root; otherwise $ is effectively root.

As for all other file types, the fileRef is using Regular Expression (.net's flavor of it anyways...)

You MUST denote the replacement group name or the script/plugin won't pick it up. That is done by simply going to the beginning of the group and writing ?<replacement>....

So a search for a random setting without a group would look like random-setting=(.*). But with the group name it will look like random-setting=(?<replacement>.*)

Support

Submit an issue

Fill out the template to the best of your abilities and send it through.

Contribute

Easily done. Just open a pull request.

Don't worry about specifics, I'll handle the minutia.

License

The MIT-License for this plugin can be reviewed at LICENSE attached to this repo.

About

In short, it allows for kinda clever text send macro templates that dynamically read other files for replacements.

Topics

Resources

License

Stars

Watchers

Forks