From 0f07d87631c82d3bbf20cc2b787252934782d43a Mon Sep 17 00:00:00 2001 From: John Conway Date: Wed, 8 May 2019 14:02:25 +0100 Subject: author url -> author uri --- src/feednim/atom.nim | 4 ++-- tests/test_atom.xml | 12 +++++------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/feednim/atom.nim b/src/feednim/atom.nim index 92e1060..3699e20 100644 --- a/src/feednim/atom.nim +++ b/src/feednim/atom.nim @@ -30,7 +30,7 @@ type AtomAuthor* = object name*: string # Required Atom field - url*: string + uri*: string email*: string AtomLink* = object @@ -79,7 +79,7 @@ proc parseAuthors ( node: XmlNode, mode="author") : seq[AtomAuthor] = for athr_node in node.findAll(mode): var author: AtomAuthor = AtomAuthor() author.name = athr_node.child("name").innerText - if athr_node.child("url") != nil: author.url = athr_node.child("url").innerText + if athr_node.child("uri") != nil: author.uri = athr_node.child("uri").innerText if athr_node.child("email") != nil: author.email = athr_node.child("email").innerText authors.add(author) diff --git a/tests/test_atom.xml b/tests/test_atom.xml index 5854868..64f443d 100644 --- a/tests/test_atom.xml +++ b/tests/test_atom.xml @@ -5,12 +5,12 @@ 2003-12-13T18:30:02Z Joe Bloggs - http://joe.bloggs + http://joe.bloggs mail@joe.bloggs - + Jane Bloggs - + Planes Trains Automobiles @@ -71,12 +71,10 @@ urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a - Aeroplanes not Airplanes + Trains Are Good 2003-12-13T18:30:02Z - Joe Bloggs - http://joe.bloggs - mail@joe.bloggs + Jane Bloggs trains -- cgit v1.2.3