MonkeyPaste.Common.Plugin 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package MonkeyPaste.Common.Plugin --version 1.0.1
NuGet\Install-Package MonkeyPaste.Common.Plugin -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MonkeyPaste.Common.Plugin" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MonkeyPaste.Common.Plugin --version 1.0.1
#r "nuget: MonkeyPaste.Common.Plugin, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MonkeyPaste.Common.Plugin as a Cake Addin
#addin nuget:?package=MonkeyPaste.Common.Plugin&version=1.0.1

// Install MonkeyPaste.Common.Plugin as a Cake Tool
#tool nuget:?package=MonkeyPaste.Common.Plugin&version=1.0.1

NuGet version (MonkeyPaste.Common.Plugin)

What is MonkeyPaste?

MonkeyPaste is a clipboard automation and productivity tool. MonkeyPaste.Common.Plugin allows for extensibility through simple request/response messaging.

Overview

MonkeyPaste plugins use a simple client/server style request and response convention for all plugin interaction. Where MonkeyPaste is the client and the plugin acts as a server. Plugins for MonkeyPaste's concerns are stateless in nature which keeps the interface as simple and lightweight as possible.

Getting Started

:::note This assumes you are on Windows (10 or higher) and have an instance of Visual Studio already installed. But plugins can also be created on Mac or Linux with VS Code and OmniSharp for free. :::

Add the MonkeyPaste.Common.Plugin dll from nuget or the cli:

dotnet add package MonkeyPaste.Common.Plugin

:::info Javascript and python plugin wrappers are currently in an alpha-stage of development. Check back at the repo for more updates! :::

Minimal Example

Code
using MonkeyPaste.Common.Plugin;

namespace MinimalExample {
    public class MinimalExample : MpIAnalyzeComponent {
        public MpAnalyzerPluginResponseFormat Analyze(MpAnalyzerPluginRequestFormat req) {
            return new MpAnalyzerPluginResponseFormat() {
                dataObjectLookup = new Dictionary<string, object>() {
                    {"Text", "Hello World!" }
                }
            };
        }
    }
}
Manifest.json

Every plugin must have a manifest.json file included in its bundle. At a minimum it provides basic meta and package information. But will also include rules for the types of content and parameters it can handle.

{
    "title": "Hello World",
    "description": "Outputs 'Hello World' as a new text clip",
    "version": "1.0",
    "author": "MonkeyPaste LLC",
    "guid": "aa4ceef6-e050-4ed5-b308-7c99942436c3",
    "projectUrl": "https://github.com/codebude/QRCoder/",
    "iconUri": "icon.png",
    "packageType": "Dll",
    "tags": "Core, Qr Code, Text, Image, Link, Converter"
}

Required Fields:

Field Detail
title Any name is fine but it must have one
guid A unique id for the plugin that should match the format in the example. I use this online generator but it just needs to be sufficiently unique.
Folder Structure
MinimalExample/
    MinimalExample.dll
    manifest.json
    icon.png

The only requirements are that the manifest.json and plugin assembly (whichever references MpIAnalyzeComponent or MpIAnalyzeComponentAsync) must be in the root folder and the root folder name must match the plugin assembly name.

Testing

Your plugin will be added loaded automatically on startup once the plugin folder (MinimalExample/) is in MonkeyPaste's root plugin folder found at C:\Users\<username>\AppData\Local\MonkeyPaste\Plugins or by clicking the 📁 button in the Plugin Browser and then restarting the application.

You will get toast notifications of any issues initializing the plugin and some will allow you to fix and retry the errors.

Beyond loading, debugging can be crudely handled using errorMessage or userNotifications properties in the MpAnalyzerPluginResponseFormat that will be displayed as toast messages.

Publishing

For the time being you can fork https://github.com/monkeypaste/mp-plugin-list and do a PR on it by adding your manifest.json to the array in ledger.json.

Samples

(Table of sample plugins)

Feedback

Feel free to raise an issue at (plugin repo link)

Getting started

Prerequisites

Usage

Minimal

using MonkeyPaste.Common.Plugin;

namespace MinimalExample {
    public class MinimalExample : MpIAnalyzeComponent {
        public MpAnalyzerPluginResponseFormat Analyze(MpAnalyzerPluginRequestFormat req) {
            return new MpAnalyzerPluginResponseFormat() {
                dataObjectLookup = new Dictionary<string, object>() {
                    {"Text", "Hello World!" }
                }
            };
        }
    }
}

Examples

Examples about how to use your package by providing code snippets/example images, or samples links on GitHub if applicable.

  • Provide sample code using code snippets
  • Include screenshots, diagrams, or other visual help users better understand how to use your package

Additional documentation

Provide links to more resources: List links such as detailed documentation, tutorial videos, blog posts, or any other relevant documentation to help users get the most out of your package.

Feedback

Where and how users can leave feedback?

  • Links to a GitHub repository where could open issues, Twitter, a Discord channel, bug tracker, or other platforms where a package consumer can connect with the package author.
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.2 221 2/19/2024
1.0.1 413 1/2/2024