{"action":"closed","issue":{"url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy/issues/4","repository_url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy","labels_url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy/issues/4/comments","events_url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy/issues/4/events","html_url":"https://github.com/Fortran-FOSS-Programmers/FoXy/issues/4","id":159719919,"number":4,"title":"Emitter facility","user":{"login":"szaghi","id":1661942,"avatar_url":"https://avatars.githubusercontent.com/u/1661942?v=3","gravatar_id":"","url":"https://api.github.com/users/szaghi","html_url":"https://github.com/szaghi","followers_url":"https://api.github.com/users/szaghi/followers","following_url":"https://api.github.com/users/szaghi/following{/other_user}","gists_url":"https://api.github.com/users/szaghi/gists{/gist_id}","starred_url":"https://api.github.com/users/szaghi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/szaghi/subscriptions","organizations_url":"https://api.github.com/users/szaghi/orgs","repos_url":"https://api.github.com/users/szaghi/repos","events_url":"https://api.github.com/users/szaghi/events{/privacy}","received_events_url":"https://api.github.com/users/szaghi/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Fortran-FOSS-Programmers/FoXy/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-06-10T20:46:03Z","updated_at":"2016-06-28T10:38:51Z","closed_at":"2016-06-28T10:38:50Z","body":"Develop the emitter facility. Tag class must be improved.\r\n\r\n+ [x] expose `xml_file%add_tag` method;\r\n+ [x] add `xml_file%del_tag`  method;\r\n+ [x] expose `xml_tag` class;\r\n+ [x] add `create` method (maybe an overloaded-by-name creator function);\r\n    * [x] support self closing tag;\r\n+ [x] add `set` methods:\r\n    + [x] for name;\r\n    + [x] for attributes;\r\n    + [x] for value;\r\n+ [x] add `del` methods:\r\n    + [x] for attributes;\r\n    + [x] fof value.\r\n\r\nTake inspiraton by the great [yattag](http://www.yattag.org).\r\n\r\n### desiderata API\r\n\r\nSomething similar to\r\n\r\n```fortran\r\ntype(xml_tag) :: a_tag\r\ntype(xml_file) :: a_file\r\n\r\na_tag = xml_tag('div') ! create `<div></div>`\r\n! add/modify/delete attributes\r\ncall a_tag%set(attributes=[['id', 'photo'], ['num', '5']]) ! become `<div id=\"photo\" num=\"5\"></div>`\r\ncall a_tag%set(attribute=['num', '9']) ! become `<div id=\"photo\" num=\"9\"></div>`\r\ncall a_tag%set(attributes=[['src', 'bar.png'], ['num', '5']]) ! become `<div id=\"photo\" num=\"5\" src=\"bar.png\"></div>`\r\ncall a_tag%del(attributes=['src', 'num']) ! become `<div id=\"photo\"></div>`\r\n! add/modify/delete value\r\ncall a_tag%set(value='lorem ipsum'//new_line('a')//'dolor sit amet')\r\n! become\r\n!<div id=\"photo\">\r\n!lorem ipsum\r\n!dolor sit amet\r\n!</div>\r\ncall a_tag%set(indent=3) ! indent value\r\n! become\r\n!<div id=\"photo\">\r\n!   lorem ipsum\r\n!   dolor sit amet\r\n!</div>\r\ncall a_tag%del_value ! become `<div id=\"photo\"></div>`\r\n! add to file\r\ncall a_file%add_tag(tag=a_tag)\r\ncall a_file%add_tag(tag=a_tag)\r\n! delete from file\r\ncall a_file%del_tag(tag=a_tag) ! by tag handler\r\ncall a_file%del_tag(tag_name='div') ! by tag name\r\n```"}}
{"actor":{"display_login":"szaghi"}}