better doc
This commit is contained in:
parent
117430b359
commit
0d170b25f1
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ venv/
|
|||||||
sites/
|
sites/
|
||||||
*.pyc
|
*.pyc
|
||||||
*~
|
*~
|
||||||
|
padinfo.json
|
||||||
|
25
README.md
25
README.md
@ -17,3 +17,28 @@ Installation
|
|||||||
|
|
||||||
pip install html5lib jinja2
|
pip install html5lib jinja2
|
||||||
|
|
||||||
|
Padinfo file
|
||||||
|
-------------
|
||||||
|
The easiest way to use etherdump is to create a padinfo JSON file that contains all the information necessary to connect to a particular etherpad server (including hostname, port, and API key).
|
||||||
|
|
||||||
|
cp padinfo.sample.json padinfo.json
|
||||||
|
nano padinfo.json
|
||||||
|
|
||||||
|
And then...
|
||||||
|
|
||||||
|
etherdump --padinfo padinfo.json list
|
||||||
|
|
||||||
|
|
||||||
|
listpads
|
||||||
|
----------
|
||||||
|
|
||||||
|
To dump the names of the pads in JSON format:
|
||||||
|
|
||||||
|
./etherdump --padinfo padinfo.json listpads
|
||||||
|
|
||||||
|
./etherdump --padinfo padinfo.json listpads > pads.json
|
||||||
|
|
||||||
|
To format for the screen add the --lines option:
|
||||||
|
|
||||||
|
./etherdump --padinfo padinfo.json listpads --lines
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ from datetime import datetime
|
|||||||
|
|
||||||
PADINFO_DEFAULTS = {
|
PADINFO_DEFAULTS = {
|
||||||
"hostname": "",
|
"hostname": "",
|
||||||
|
"port": 9001,
|
||||||
"apiversion": "1.2.9",
|
"apiversion": "1.2.9",
|
||||||
"apiurl": "/api/"
|
"apiurl": "/api/"
|
||||||
}
|
}
|
||||||
@ -326,8 +327,7 @@ if __name__ == "__main__":
|
|||||||
apikey=padinfo.get("apikey")
|
apikey=padinfo.get("apikey")
|
||||||
)
|
)
|
||||||
|
|
||||||
if verbose:
|
print ("Connecting to {0}".format(padserver.apiurl), file=sys.stderr)
|
||||||
print ("Connecting to {0}".format(padserver.apiurl), file=sys.stderr)
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# Command Dispatch
|
# Command Dispatch
|
||||||
|
7
padinfo.sample.json
Normal file
7
padinfo.sample.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"hostname": "localhost",
|
||||||
|
"port": 9001,
|
||||||
|
"apiurl": "/api/",
|
||||||
|
"apiversion": "1.2.9",
|
||||||
|
"apikey": "XXXXXXXXXXXXXXXXXXXXXXXXX"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user