Metadata-Version: 2.4
Name: etherdump
Version: 1.0.2
Summary: a set of utilities for using the etherpad API to make static dumps of pads
Project-URL: Homepage, https://gitlab.constantvzw.org/aa/etherdump
Author-email: Michael Murtaugh <mm@automatist.org>
License-Expression: GPL-3.0-or-later
License-File: LICENSE.txt
Requires-Python: >=3.12
Requires-Dist: click>=8.1.8
Requires-Dist: html5lib>=1.1
Requires-Dist: jinja2>=3.1.6
Requires-Dist: python-dateutil>=2.9.0.post0
Requires-Dist: requests-oauthlib>=2.0.0
Description-Content-Type: text/markdown

etherdump
=========

Tool to help manage periodic publishing of [etherpads](http://etherpad.org/) to static files, preserving metadata. Uses the etherpad API (and so it requires having the APIKEY.txt contents of an etherpad installation).


Installation
-------------

    pip install etherdump

Usage
---------------
	mkdir mydump
	cd myddump
	etherdump init

The settings are placed in a file called etherpad_info.json (by default) and can be specified with the --padinfo option on subcommands. **Make sure that this file is not exposed publically, as it contains the APIKEY to the etherpad server.**

	etherdump list

You should see a list of pads.



Cookbook
========================

Using etherdump to maintain a static HTML archive of pads
-------------------------------------------------------------------

	# Mis à jour les pads changé
	etherdump pull --padinfo ..path/to/etherpad_info.json

	# Récrée les pages index...
	etherdump index --padinfo ../path/to/etherpad_info.json p/*.meta.json > index.html


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

    mkdir instance1 && cd instance1
    etherdump init
    etherdump pull

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

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.

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.


Magicwords
=================
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.


