On Wed, Jul 06, 2022 at 12:50:02AM +0200, fadelkon wrote:
>
>
>El 5 de juliol de 2022 21:13:21 CEST, lesion via Gancio-list <gancio-list@???> ha escrit:
>>On Mon, Jul 04, 2022 at 06:31:29PM +0200, fadelkon wrote:
>>>
>>> https://framagit.org/bcn.convocala/gancio-plugin-telegram-bridge
>>>
>>> It's very basic, but I'm confident we can build something on top of it to do a proper plugin and to help to improve the plugin system! :D
>>
>>
>>so this is working?
>
>Yes! What is working:
>- when I create an event, a telegram message is sent to a channel with a picture and some format of the data
>
>What is not:
>- limits checking: image size, caption size limit (description + tags and more)
>- description HTML cleaning.
>- the rendered message format is improvable (date, links to event/ ICS/. ..)
>- it's using a fixed image and link bcause in a from a dev env I couldn't send a public image link to telegram.
>
>> what do you need?
>>
>
>I want to know how to have more than one plugin. I tried to put the code like /plugins/telegram/index.js but it only worked with /plugins/index.js This makes me wonder how to have more than one plugin at a time.
all plugins code is here:
https://framagit.org/les/gancio/-/blob/master/server/api/controller/settings.js#L110-134
now is working with a file for each plugin :) this has to be changed for
sure, they will need a specific controller too.
>>as we discussed, we probably need a way to specify plugin settings,
>>in this case I think we should publish plugins within the release, do you?
>
>I'm not sure about the link between specifying plugin settings and
>publishing plugins. I don't understand what do you mean with "within
>the release".
my point is: there's not reason to publish a telegram plugin that i cannot change
settings to, api key, etc... that's why I think we need a way to specify
plugin settings before publishing any plugin.
With "within the release" I mean to embed / include plugins directly
inside the "official" gancio release (disabled by default of course),
avoiding any other additional system.
>Anyway, I think that being able to (download and?) enable this plugin
>via web, and setting the 2 params that this needs, it would be super
>cool.
>
>I don't care how to distribute the plugin code: via git submodules,
>where each plugin has its own repo, or the same but with just one repo
>with all "official" plugins, or inside les/gancio repo itself.
>
>Regarding the parameters to set, we could define them with a json
>schema. But you were reluctant to open it as much as WordPress, and I
>don't know exactly what implies.
yep a json schema would be nice. WP has a huge plugin system because
you can change each detail of everything with a plugin, it's full of
hooks at every operation, I don't want to take that path.
for instance, let's say you want to solve this issue with a plugin:
https://framagit.org/les/gancio/-/issues/139#note_1848349
this should be possible with WP way.
ciaoo
ps. I'm on vacation until the 25th so I'll answer emails but do not
expect any commit. ciaooo
>Bona nit ^^