From 95f32e6c767a03bc1b16bcd5a596b77cb49de9e4 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Sat, 20 May 2017 11:50:20 +0200 Subject: Start reading entries --- scripts/tellico2lesana | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3