Skip to main content

šŸ“ Simple Transform Plugin

The Simple Transform plugin provides basic text transformation using a template-based approach with placeholders.

šŸ”§ Setup Guideā€‹

  1. Define the plugin in your curate.config.json:

    {
    "plugins": {
    "@curatedotfun/simple-transform": {
    "type": "transformer",
    "url": "./external/simple-transform"
    }
    }
    }
  2. Add the transformer to a feed's output stream:

    {
    "feeds": [
    {
    "id": "your-feed",
    "outputs": {
    "stream": {
    "enabled": true,
    "transform": {
    "plugin": "@curatedotfun/simple-transform",
    "config": {
    "format": "šŸ“ {CONTENT}\nCurated by @{CURATOR}"
    }
    },
    "distribute": [
    // Your distributors here
    ]
    }
    }
    }
    ]
    }

Available Placeholdersā€‹

The format string supports the following placeholders:

  • {CONTENT}: The original content
  • {CURATOR}: The curator's username
  • {CURATOR_NOTES}: Any notes added by the curator
  • {SUBMISSION_ID}: The submission ID

Example Configurationā€‹

Here's a real example from the cryptofundraise feed:

{
"transform": {
"plugin": "@curatedotfun/simple-transform",
"config": {
"format": "šŸ“ new fundraising announcement, curated by *{CURATOR}*\n{CONTENT}\nšŸ“Œ source: [View Post](https://x.com/x/status/{SUBMISSION_ID})"
}
}
}