A collection of simple scripts that wrap the Etherpad API (developed for Etherpad v1.9.2, full docs developed against here)
- Python 3 (tested with Python 3.12.8)
- Clone the repo
- Navigate inside the root folder (
etherpad-scripts/) - (Optional) Create a venv (virtual environment)
- (Assumes use of Linux, find an OS-specific guide for Windows or other OS if necessary)
- In the root folder, run
python3 -m venv ./etherpad-venvto create the venv - Now run
source ./etherpad-venv/bin/activateto activate the venv
- Install requirements using
pip install -r requirements.txt - Configure
.envfile- [Required] URL - The URL of the etherpad instance (e.g. https://etherpad.example.com) -- MUST INCLUDE
https://where relevant - [Required] API_VER - The API version of the etherpad instance (e.g. 1.3.0) -- Note that this is not the same as the Etherpad version and can probably be found at
<URL>/api/as the value ofcurrentVersion - [Optional] TOKEN - The Etherpad API token, found in the root folder of the Etherpad instance in
APIKEY.txt
- [Required] URL - The URL of the etherpad instance (e.g. https://etherpad.example.com) -- MUST INCLUDE
- Run scripts using
python3 <script_name> <parameters> - Running
python3 <script_name> -hprovides a better listing of help information for a specific script
This script wraps the API method movePad (since Etherpad does not seem to natively support renaming a file with the change showing in the list of pads)
Required parameters:
- -s, --source : The name of the pad to move
- -d, --dest : The name the pad will be moved to
Optional parameters:
- -t, --token : The Etherpad API token. If this is not specified, the token in
.envwill be used. If both are set, the command line parameter takes priority
This script wraps the API method deletePad
Required parameters:
- -p, --pad : The name of the pad to delete
Optional parameters:
- -t, --token : The Etherpad API token. If this is not specified, the token in
.envwill be used. If both are set, the command line parameter takes priority