"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "scripts/schema-dump.py" between
roundup-1.6.1.tar.gz and roundup-2.0.0.tar.gz

About: Roundup is an highly customisable issue-tracking system with command-line, web and e-mail interfaces (written in Python).

schema-dump.py  (roundup-1.6.1):schema-dump.py  (roundup-2.0.0)
skipping to change at line 13 skipping to change at line 13
""" """
Use recently documented XML-RPC API to dump Use recently documented XML-RPC API to dump
Roundup data schema in human readable form. Roundup data schema in human readable form.
Future development may cover: Future development may cover:
[ ] unreadable dump formats [ ] unreadable dump formats
[ ] access to local database [ ] access to local database
[ ] lossless dump/restore cycle [ ] lossless dump/restore cycle
[ ] data dump and filtering with preserved [ ] data dump and filtering with preserved
""" """
from __future__ import print_function
__license__ = "Public Domain" __license__ = "Public Domain"
__version__ = "1.0" __version__ = "1.0"
__authors__ = [ __authors__ = [
"anatoly techtonik <techtonik@gmail.com>" "anatoly techtonik <techtonik@gmail.com>"
] ]
import os import os
import sys import sys
import xmlrpclib from roundup.anypy import xmlrpc_
import pprint import pprint
import textwrap import textwrap
from optparse import OptionParser from optparse import OptionParser
sname = os.path.basename(sys.argv[0]) sname = os.path.basename(sys.argv[0])
usage = """\ usage = """\
usage: %s [options] URL usage: %s [options] URL
URL is XML-RPC endpoint for your tracker, such as: URL is XML-RPC endpoint for your tracker, such as:
skipping to change at line 95 skipping to change at line 97
if "--version" in sys.argv: if "--version" in sys.argv:
sys.exit(sname + " " + __version__) sys.exit(sname + " " + __version__)
parser = OptionParser() parser = OptionParser()
parser.add_option("--raw", action='store_true') parser.add_option("--raw", action='store_true')
parser.add_option("--yaml", action='store_true') parser.add_option("--yaml", action='store_true')
parser.add_option("--json", action='store_true') parser.add_option("--json", action='store_true')
(options, args) = parser.parse_args() (options, args) = parser.parse_args()
url = args[0] url = args[0]
roundup_server = xmlrpclib.ServerProxy(url, allow_none=True) roundup_server = xmlrpc_.client.ServerProxy(url, allow_none=True)
schema = roundup_server.schema() schema = roundup_server.schema()
if options.raw: if options.raw:
print(str(schema)) print(str(schema))
elif options.yaml: elif options.yaml:
print(format_yaml(schema)) print(format_yaml(schema))
elif options.json: elif options.json:
print(format_json(schema)) print(format_json(schema))
else: else:
print(format_pprint(schema)) print(format_pprint(schema))
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)