Added module renderers json tsv csv xml

This commit is contained in:
DiG 2022-01-16 19:30:24 +01:00
parent 065b3ff0ff
commit c8890058fc
2 changed files with 4 additions and 2 deletions

View File

@ -20,7 +20,7 @@ def eprint(*args, **kwargs):
FOLDER = '/home/dig/odoo-export/datas'
# PARAMS = sys.argv[1:]
PARAMS = []
OPTS = { 'format': 'tsv' }
OPTS = {}
for param in sys.argv[1:]:
if param[0] == '-':
kv = param[1:].split( '=' )
@ -42,7 +42,7 @@ with open(".modelignore", "r") as file:
for line in file:
MODEL_IGNORE.append(line.strip())
eprint( len(sys.argv), 'argument(s):', OPTS, PARAMS )
eprint( len(sys.argv), 'argument(s):', PARAMS, OPTS )
eprint( MODEL_IGNORE )

View File

@ -56,3 +56,5 @@ def render( opts, model, list ): # +format=json,xml,csv +json +tsv
render_csv( model, list )
# elif ( 'xml' in opts and opts['xml'] ) or ( 'format' in opts and 'xml' in opts['format'] ):
# render_xml( model, list )
else:
render_tsv( model, list )