From 7c449cb88735ec694afc55d7d30d4b9464fc6b27 Mon Sep 17 00:00:00 2001 From: Luke Murphy Date: Mon, 7 Oct 2019 23:35:18 +0200 Subject: [PATCH] Remove those, they'll probably go out of date soon --- README.md | 3 +-- etherpump/examples/magicword.py | 25 ------------------------- 2 files changed, 1 insertion(+), 27 deletions(-) delete mode 100644 etherpump/examples/magicword.py diff --git a/README.md b/README.md index 4758818..d386d9c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/etherpump/examples/magicword.py b/etherpump/examples/magicword.py deleted file mode 100644 index 1ebba37..0000000 --- a/etherpump/examples/magicword.py +++ /dev/null @@ -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()