print(u"Warning: unable to load HTML for pad {0}, {1}".format(padid,e).encode("utf-8"),file=sys.stderr)
withopen(fp+".json","w")asf:
f.write(json.dumps(meta))
ifsleeptime:
time.sleep(sleeptime)
if__name__=="__main__":
parser=argparse.ArgumentParser()
parser.add_argument('command',default="",help='command to perform: listpads, listgroups, dump, createindex')
parser.add_argument('--padinfo',default="padinfo.json",help='path to JSON file containing all pad login data, default padinfo.json, alternatively specify hostname, port, etc as separate options')
parser.add_argument('--hostname',default="",help='the hostname of the etherpad server')
parser.add_argument('--port',type=int,help='port of etherpad server')
parser.add_argument('--apikey',help='API key')
parser.add_argument('--apiversion',help='the version of the etherpad api')
parser.add_argument('--apiurl',help='URL path to the API')