Magic word experimentation API #2

Closed
opened 2019-09-17 22:31:20 +02:00 by decentral1se · 1 comment
Owner

I am thinking about how to make it more accessible to experiment with etherpump. It is not very easy to ask people to edit the source code to make it do what they want. The command line interface is also quite scary 😅.

So, I am wondering about an etherpump API! It might look like:

# etherpumping.py

from etherpump.api import react

@react("__MY_MAGIC_WORD__")
def react_to_my_magic_word(pads):
    for pad in pads:
        print(pad.text)

Then just run:

$ pip install etherpump
$ python etherpumping.py

So, anyone can write a small script and etherpump will take care of the heavy lifting of scanning the pads and matching each pad with the given magic word and giving this pad, text, metadata to the function.

I am thinking about how to make it more accessible to experiment with `etherpump`. It is not very easy to ask people to edit the source code to make it do what they want. The command line interface is also quite scary :sweat_smile:. So, I am wondering about an `etherpump` API! It might look like: ``` # etherpumping.py from etherpump.api import react @react("__MY_MAGIC_WORD__") def react_to_my_magic_word(pads): for pad in pads: print(pad.text) ``` Then just run: ``` $ pip install etherpump $ python etherpumping.py ``` So, anyone can write a small script and `etherpump` will take care of the heavy lifting of scanning the pads and matching each pad with the given magic word and giving this pad, text, metadata to the function.
decentral1se changed title from Etherpump magic word experimentation API to Magic word experimentation API 2019-09-24 17:20:36 +02:00
Author
Owner

Done in e1691830b1

Done in https://git.vvvvvvaria.org/varia/etherpump/commit/e1691830b1c9a6b424a4340f98233c84f174316f
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: varia/etherpump#2
No description provided.