Remove those, they'll probably go out of date soon

This commit is contained in:
Luke Murphy 2019-10-07 23:35:18 +02:00
parent b37351ec61
commit 7c449cb887
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 1 additions and 27 deletions

View File

@ -123,8 +123,7 @@ The settings are placed in a file called `.etherpump/settings.json` and are used
Library API Example
-------------------
Etherpump can be used as a library. See [etherpump/examples](https://git.vvvvvvaria.org/varia/etherpump/src/branch/master/etherpump/examples)
or read the short one below:
Etherpump can be used as a library:
```python
from etherpump.api import magicword

View File

@ -1,25 +0,0 @@
"""How to use the 'magicword' API.
In this example, we have a pad called "my-pad-name" on our etherpad-lite
instance. Inside the content of that pad is the so-called "magic word"
__WORSE_IS_BETTER__. The "@magicword" takes care of retrieving all the formats
of those pads and returns a dictionary called "pads" ready to go.
Run this example like so:
$ python etherdump/examples/magicword.py
"""
from etherpump.api import magicword
@magicword('__WORSE_IS_BETTER__')
def can_be_called_anything_you_like(pads):
print(pads['foobar']['html'])
print(pads['foobar']['txt'])
print(pads['foobar']['meta'])
if __name__ == "__main__":
can_be_called_anything_you_like()