š Simple Transform Plugin
The Simple Transform plugin provides basic text transformation using a template-based approach with placeholders.
š§ Setup Guideā
-
Define the plugin in your
curate.config.json
:{
"plugins": {
"@curatedotfun/simple-transform": {
"type": "transformer",
"url": "./external/simple-transform"
}
}
} -
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})"
}
}
}