eteaching.plone.nostrmetadatasync
Nostr integration for Plone 6.
eteaching.plone.nostrmetadatasync synchronises metadata of Plone contents with Nostr. This is done on the basis of subscribers (event handlers). When content is created, deleted or modified on the Plone website, corresponding Nostr events are created, signed and sent to predefined relias in the Nostr network. Two control panels are also provided. One is for settings, where you can specify which content types and filters should be used to select the content affected by synchronization. The second control panel can be used to create all events in the Nostre relays for the entire content selected using the settings, or to send delete events.
Features
- Real-time synchronization between metadata for event-based plone objects (e.g. plone.app.event) and Nostr time-based calendar events (NIP-52).
- Real-time synchronization between metadata for educational materials and Nostr AMB events (NIP-AMB)
- Initial creation of Nostr events for the metadata of all supported objects
- Specific configuration options where portal types and additional restrictions for synchronization can be selected
Installation
Prerequisites
- An operating system that runs all the requirements mentioned.
- Python 3.10, 3.11, 3.12, or 3.13
- uv
- Make
- Git
Install eteaching.plone.nostrmetadatasync from source with git 🔧
This is not an installation for production use, but rather for testing and development purposes.
Clone this repository, then change your working directory
git clone git@github.com:e-teachingorg/eteaching.plone.nostrmetadatasync.git cd eteaching.plone.nostrmetadatasyncCreate environment and install uv
python3 -m venv . bin/pip install uv source bin/activateCreate an .env file
vi .envto set NOST_KEY as an environment variable:
NOSTR_KEY=MyPrivateNostrKeyInstall the code base
make installCreate a empty Plone site (user:admin, password:admin)
make create-siteStart
make start
Install eteaching.plone.nostrmetadatasync via buildout
Use zc.buildout >=5, e.g. using the following requirements.txt:
horse-with-no-namespace==20251105.1 packaging==25.0 pip==25.3 setuptools==80.9.0 wheel==0.45.1 zc.buildout==5.1.1Install Python venv and requirements:
bin/python3 -m venv . bin/pip install -r requirements.txtCreate an .env file
vi .envto set NOST_KEY as an environment variable:
NOSTR_KEY=MyPrivateNostrKeyAdd the following to buildout.cfg:
[buildout] eggs = eteaching.plone.nostrmetadatasync ... [instance] environment-vars = NOSTR_KEY ${env:NOSTR_KEY} ...Run buildout
bin/buildoutStart
bin/instance fg
Example: Set up synchronization for Plone News Items
Open your Plone site (e.g. http://localhost:8080/Plone for testing) in your browser
Login
Click “admin” ➔ “Site Setup”
Under “Add-ons”, check to see if the “Nostr Metadata Sync” add-on is installed. If not, install it.
Then go back to “Site Setup” ➔ “Add-on Configuration” ➔ “Nostr Metadata Sync management”
Click “Configure this add-on”
Enter nostr relays. (If you’ve started Nak with
nak serveon the same computer, enter the following: ws://localhost:10547)Enable “News Item” under “Calendar adapter types”
You can enter additional search filters and also specify a community key if you want to sync to a specific community
Click “Save”
Now, when you create News Items in the portal and publish them, they should sync with the relays you’ve entered.
Contribute
License
The project is licensed under the GPLv2.