Browse Source

better doc

add-quote-import
Michael Murtaugh 9 years ago
parent
commit
0d170b25f1
  1. 1
      .gitignore
  2. 25
      README.md
  3. 4
      etherdump
  4. 7
      padinfo.sample.json

1
.gitignore

@ -2,3 +2,4 @@ venv/
sites/
*.pyc
*~
padinfo.json

25
README.md

@ -17,3 +17,28 @@ Installation
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

4
etherdump

@ -11,6 +11,7 @@ from datetime import datetime
PADINFO_DEFAULTS = {
"hostname": "",
"port": 9001,
"apiversion": "1.2.9",
"apiurl": "/api/"
}
@ -326,8 +327,7 @@ if __name__ == "__main__":
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

7
padinfo.sample.json

@ -0,0 +1,7 @@
{
"hostname": "localhost",
"port": 9001,
"apiurl": "/api/",
"apiversion": "1.2.9",
"apikey": "XXXXXXXXXXXXXXXXXXXXXXXXX"
}
Loading…
Cancel
Save