From: MyungJoo Ham Date: Tue, 25 Apr 2017 05:50:41 +0000 (+0900) Subject: [TIC-Core] UI element HF and QT implemented. GBS support of category X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=HEAD;hp=2f1f14037ed55299a7dfd45bf4c0e6d8675d7a77;p=archive%2F20170607%2Ftools%2Ftic-core.git [TIC-Core] UI element HF and QT implemented. GBS support of category 1. __UI__HF and __UI__QT supports a blank line with reduced heights. 2. GBS 0.24.6 does not publish suggests tags properly with its RPM repos (repomd.xml) In order to show categories properly, added a hardcoded fall back routines for GBS. Change-Id: Id914d8f1dcbf1df4687b4a2764dbf1e9fae05895 Signed-off-by: MyungJoo Ham --- diff --git a/tic/parser/view_parser.py b/tic/parser/view_parser.py index 5bff01b..bb6f06d 100644 --- a/tic/parser/view_parser.py +++ b/tic/parser/view_parser.py @@ -111,6 +111,10 @@ def make_view_data(pkg_group): elif tag == 'HT' or tag == 'ht': # Keep the summary (TODO: verify the usage of HTML tags.) node['text'] = node['text'] # Do we need conversion? + elif tag == 'HF' or tag == 'hf': + node['text'] = '

' + elif tag == 'QT' or tag == 'qt': + node['text'] = '

' else: node['text'] = '' return node @@ -201,6 +205,18 @@ def make_view_data(pkg_group): view_ref[root[0]] = root_node if root[0] in category_dict: root_node['category'] = category_dict[root[0]] + else: + # Backup routine for GBS, which does not seem to publish suggest info correctly. + # TODO: This routine has hardcoded category names, which should be improved. + m = re.search('(?<=root-)[a-zA-Z]*', root[0]) + if m: + cat = m.group(0) + if cat == 'domain': + cat = 'domains' + if cat == 'feature': + cat = 'epicfeatures' + root_node['category'] = cat + logger.info("Fallback for "+cat+" for "+root[0]) if is_blank_ui_meta_node(root[0]): name = root[0] sub1_node = handle_ui_meta_node(name[-2:], root_node)