2021-12-06 17:34:16 +01:00
pppadump
2015-02-26 13:54:26 +01:00
=========
2021-09-16 12:06:42 +02:00
Tool to help manage periodic publishing of [etherpads ](http://etherpad.org/ ) to static files, preserving metadata.
2015-02-26 17:15:41 +01:00
Requirements
-------------
2018-01-12 14:45:36 +01:00
* python3
2016-10-17 15:40:16 +02:00
* html5lib
2016-10-21 13:04:15 +02:00
* requests (settext)
2018-01-12 15:46:10 +01:00
* python-dateutil, jinja2 (index subcommand)
2015-02-26 17:15:41 +01:00
2015-03-05 16:24:23 +01:00
Installation
-------------
2016-10-17 15:40:16 +02:00
pip install python-dateutil jinja2 html5lib
2015-09-17 18:47:25 +02:00
python setup.py install
2015-03-05 16:24:23 +01:00
2019-06-14 13:20:49 +02:00
Usage
2016-10-17 13:06:56 +02:00
---------------
mkdir mydump
cd myddump
2021-12-06 17:34:16 +01:00
pppadump init
2016-10-17 13:06:56 +02:00
The program then interactively asks some questions:
2015-06-18 14:56:48 +02:00
2016-10-17 13:06:56 +02:00
Please type the URL of the etherpad:
http://automatist.local:9001/
The APIKEY is the contents of the file APIKEY.txt in the etherpad folder
Please paste the APIKEY:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2015-06-18 14:56:48 +02:00
2021-12-06 17:34:16 +01:00
The settings are placed in a file called .pppadump/settings.json and are used (by default) by future commands.
2015-06-18 14:56:48 +02:00
2021-12-06 17:34:16 +01:00
pppadump list
2019-06-14 13:20:49 +02:00
You should see a list of pads.
2015-06-18 14:56:48 +02:00
2015-09-17 18:47:25 +02:00
subcommands
2015-06-18 14:56:48 +02:00
----------
2016-10-17 13:06:56 +02:00
* init
* pull
2015-09-17 18:47:25 +02:00
* list
2019-06-14 13:22:39 +02:00
2015-09-17 18:47:25 +02:00
* listauthors
2015-11-19 12:52:35 +01:00
* gettext
2016-10-17 15:40:31 +02:00
* settext
2015-11-19 12:52:35 +01:00
* gethtml
* creatediffhtml
2015-09-17 18:47:25 +02:00
* revisionscount
2016-10-17 15:40:16 +02:00
* index
2016-10-17 15:40:31 +02:00
* deletepad
2019-06-14 13:22:39 +02:00
* pushhtml
2015-06-18 14:56:48 +02:00
2015-09-17 18:47:25 +02:00
To get help on a subcommand:
2015-06-18 14:56:48 +02:00
2021-12-06 17:34:16 +01:00
pppadump revisionscount --help
2015-11-13 11:03:57 +01:00
2016-10-17 15:40:16 +02:00
2019-06-14 13:22:39 +02:00
Cookbook
2019-06-14 11:47:29 +02:00
========================
2021-12-06 17:34:16 +01:00
Using pppadump to migrate from one etherpad instance to another
2019-06-14 11:47:29 +02:00
------------------------------------------------------------------
mkdir instance1 & & cd instance1
2021-12-06 17:34:16 +01:00
pppadump init
pppadump pull --html --meta
2019-06-14 11:47:29 +02:00
(cd ..)
mkdir instance2 & & cd instance2
2021-12-06 17:34:16 +01:00
pppadump init
pppadump pushhtml --basepath ../instance1 ../instance1/p/*.meta.json
2019-06-14 11:47:29 +02:00
2019-06-14 13:22:39 +02:00
NB: sethtml/pushhtml seems to only work on the server itself, ie using API url such as localhost:9001.
NB: This command indescriminantly clobbers pads in instance2 with the HTML of the dumped versions from instance1.
2019-06-14 11:47:29 +02:00
2019-06-14 13:22:39 +02:00
This technique can be used to "reset" the database of a pad by recreating pads (without their history or editor info/colors) in a fresh database.
2019-06-14 11:47:29 +02:00
2019-06-14 13:20:49 +02:00
2021-09-16 12:06:42 +02:00
Magicwords
=================
2021-09-16 12:07:34 +02:00
Following the suggestions of sister project/friendly fork [etherpump ](https://git.vvvvvvaria.org/varia/etherpump/ ), the magic word mechanism has been expanded (from the inital single hard coded \_\_NOPUBLISH__ value) to and generalized to allow a the use of text markers in the source text to control various options, including options for use in preprocessing and translation of markdown using pandoc.
2021-09-16 12:06:42 +02:00
2019-06-14 13:20:49 +02:00
2016-10-17 15:40:16 +02:00
Originally designed for use at: [constant ](http://etherdump.constantvzw.org/ ).