Magic word experimentation API #2

Closed
opened 5 years ago by decentral1se · 1 comments
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 5 years ago
Poster
Owner

Done in e1691830b1

Done in https://git.vvvvvvaria.org/varia/etherpump/commit/e1691830b1c9a6b424a4340f98233c84f174316f
decentral1se closed this issue 5 years ago
Sign in to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.