README.md 2.61 KB
Newer Older
Michael Murtaugh's avatar
Michael Murtaugh committed
1 2 3
etherdump
=========

Michael Murtaugh's avatar
Michael Murtaugh committed
4
Tool to publish [etherpad](http://etherpad.org/) pages to files.
Michael Murtaugh's avatar
Michael Murtaugh committed
5 6 7 8


Requirements
-------------
Michael Murtaugh's avatar
Michael Murtaugh committed
9
	* python3
Michael Murtaugh's avatar
Michael Murtaugh committed
10
	* html5lib
11
	* requests (settext)
12
	* python-dateutil, jinja2 (index subcommand)
Michael Murtaugh's avatar
Michael Murtaugh committed
13

Michael Murtaugh's avatar
readme  
Michael Murtaugh committed
14 15 16
Installation
-------------

Michael Murtaugh's avatar
Michael Murtaugh committed
17
    pip install python-dateutil jinja2 html5lib
Michael Murtaugh's avatar
Michael Murtaugh committed
18
    python setup.py install
Michael Murtaugh's avatar
readme  
Michael Murtaugh committed
19

Michael Murtaugh's avatar
Michael Murtaugh committed
20
Usage
Michael Murtaugh's avatar
Michael Murtaugh committed
21 22 23 24 25 26
---------------
	mkdir mydump
	cd myddump
	etherdump init

The program then interactively asks some questions:
Michael Murtaugh's avatar
Michael Murtaugh committed
27

Michael Murtaugh's avatar
Michael Murtaugh committed
28 29 30 31 32
	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
Michael Murtaugh's avatar
Michael Murtaugh committed
33

Michael Murtaugh's avatar
Michael Murtaugh committed
34
The settings are placed in a file called .etherdump/settings.json and are used (by default) by future commands.
Michael Murtaugh's avatar
Michael Murtaugh committed
35 36


Michael Murtaugh's avatar
Michael Murtaugh committed
37 38 39 40
	etherdump list

You should see a list of pads.

Michael Murtaugh's avatar
Michael Murtaugh committed
41

Michael Murtaugh's avatar
Michael Murtaugh committed
42
subcommands
Michael Murtaugh's avatar
Michael Murtaugh committed
43 44
----------

Michael Murtaugh's avatar
Michael Murtaugh committed
45 46
* init
* pull
Michael Murtaugh's avatar
Michael Murtaugh committed
47
* list
Michael Murtaugh's avatar
Michael Murtaugh committed
48

Michael Murtaugh's avatar
Michael Murtaugh committed
49
* listauthors
Michael Murtaugh's avatar
Michael Murtaugh committed
50
* gettext
Michael Murtaugh's avatar
readme  
Michael Murtaugh committed
51
* settext
Michael Murtaugh's avatar
Michael Murtaugh committed
52 53
* gethtml
* creatediffhtml
Michael Murtaugh's avatar
Michael Murtaugh committed
54
* revisionscount
Michael Murtaugh's avatar
Michael Murtaugh committed
55
* index
Michael Murtaugh's avatar
readme  
Michael Murtaugh committed
56
* deletepad
Michael Murtaugh's avatar
Michael Murtaugh committed
57
* pushhtml
Michael Murtaugh's avatar
Michael Murtaugh committed
58

Michael Murtaugh's avatar
Michael Murtaugh committed
59
To get help on a subcommand:
Michael Murtaugh's avatar
Michael Murtaugh committed
60

Michael Murtaugh's avatar
Michael Murtaugh committed
61
	etherdump revisionscount --help
Michael Murtaugh's avatar
Michael Murtaugh committed
62

Michael Murtaugh's avatar
Michael Murtaugh committed
63

Michael Murtaugh's avatar
Michael Murtaugh committed
64
Cookbook
65 66 67 68 69 70 71 72 73 74 75 76 77 78
========================

Using etherdump to migrate from one etherpad instance to another
------------------------------------------------------------------

    mkdir instance1 && cd instance1
    etherdump init
    etherdump pull --html --meta

    (cd ..)
    mkdir instance2 && cd instance2
    etherdump init
    etherdump pushhtml --basepath ../instance1 ../instance1/p/*.meta.json

Michael Murtaugh's avatar
Michael Murtaugh committed
79 80 81
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.
82

Michael Murtaugh's avatar
Michael Murtaugh committed
83
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.
84

Michael Murtaugh's avatar
Michael Murtaugh committed
85 86 87



88 89 90 91




Michael Murtaugh's avatar
Michael Murtaugh committed
92 93 94 95 96 97 98 99 100
Change log / notes
=======================

Originally designed for use at: [constant](http://etherdump.constantvzw.org/).


17 Oct 2016
-----------------------------------------------
Preparations for [Machine Research](https://machineresearch.wordpress.com/) [2](http://constantvzw.org/site/Machine-Research,2646.html)
101

Michael Murtaugh's avatar
python3  
Michael Murtaugh committed
102 103 104 105 106 107 108 109

6 Oct 2017
----------------------
Feature request from PW: When deleting a previously public document, generate a page / pages with an explanation (along the lines of "This document was previously public but has been marked .... maybe give links to search").

3 Nov 2017
---------------
machineresearch seems to be __NOPUBLISH__ but still exists (also in recentchanges)
Michael Murtaugh's avatar
Michael Murtaugh committed
110 111 112 113 114

Jan 2018
-------------
Updated files to work with python3 (probably this has broken python2).

Michael Murtaugh's avatar
Michael Murtaugh committed
115 116 117
Jun 2019
-------------
Revised sethtml & added pushhtml