RetroFed Forum
Your home away from modern life.
How to use Plugins from this community
Post Reply
AuthorMessage
hendrik palaver.p3x.de hendrik@palaver.p3x.de
Joined: 2021-08-21
Quote

Share Plugin snippets and discuss PieFed Plugin development in this community.

First of all: Plugins are an admin-only thing. They hook into PieFed's internals and have access to the entire instance and its database. So:

  • This feature is not intended for moderators and users. You have to be an instance owner to be able to install Plugins.
  • Caution is advised, don't blindly copy-paste executable code from the internet.
  • Plugins are still in an early stage.

Documentation is at: https://codeberg.org/rimu/pyfedi/src/branch/main/docs/PLUGINS.md

To install a plugin, copy the code to piefed/app/plugins/<plugin_name>/__init__.py

As there's currenty no admin interface, deactivate plugins by renaming them. For example __init__.py --> __init__.py.disabled

You will find log output in your send_queue's output. If you set it up in a crontab as per the INSTALL.md, that's likely journalctl -u cron.service -f

Make sure to mention additional library requirements and install them in PieFed's environment.

2   Original
hendrik Moderator hendrik@palaver.p3x.de
Joined: 2021-08-21
#2 · Quote Reply

It will take some time to figure out some useful plugin examples. Until then, there's some example boilerplate code in: https://codeberg.org/rimu/pyfedi/src/branch/main/app/plugins/example_plugin

1
Post Reply
Back to top