diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-05-20 11:50:20 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2017-05-20 11:50:20 +0200 |
commit | 95f32e6c767a03bc1b16bcd5a596b77cb49de9e4 (patch) | |
tree | 0c9dedc901fcb5601b40b2b1e6c881f6c18bb8b2 | |
parent | bd5a61a44e6925d2003547cf9fbfaf1066c65aa1 (diff) |
Start reading entries
-rwxr-xr-x | scripts/tellico2lesana | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/tellico2lesana b/scripts/tellico2lesana index c3cbeef..1c579c9 100755 --- a/scripts/tellico2lesana +++ b/scripts/tellico2lesana @@ -59,8 +59,9 @@ class T2L(guacamole.Command): # TODO: support fields with the multiple values flag # (they should probably become lists) fields.append({ - 'name': xf.attrib['title'], + 'name': xf.attrib['name'], 'type': f_type, + 'help': xf.attrib['title'], }) # Create a collection with the settings we have loaded directory = ctx.args.collection or ctx.args.file.replace( @@ -77,6 +78,12 @@ class T2L(guacamole.Command): ) # import data + for xe in xml_collection.findall(XML_NS+'entry'): + data = { + 'uid': xe.attrib['id'] + } + for xfield in xe.getchildren(): + print(xfield, xfield.text) |