Hello community,

here is the log from the commit of package kapidox for openSUSE:Factory checked 
in at 2017-05-16 14:46:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kapidox (Old)
 and      /work/SRC/openSUSE:Factory/.kapidox.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kapidox"

Tue May 16 14:46:24 2017 rev:40 rq:495019 version:5.34.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/kapidox/kapidox.changes  2017-04-30 
21:24:44.753525665 +0200
+++ /work/SRC/openSUSE:Factory/.kapidox.new/kapidox.changes     2017-05-16 
14:47:03.947022852 +0200
@@ -1,0 +2,10 @@
+Mon May 15 13:53:11 CEST 2017 - fab...@ritter-vogt.de
+
+- Update to 5.34.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.34.0.php
+- Changes since 5.33.0:
+  * Kapidox generates qch files
+
+-------------------------------------------------------------------

Old:
----
  kapidox-5.33.0.tar.xz

New:
----
  kapidox-5.34.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kapidox.spec ++++++
--- /var/tmp/diff_new_pack.o0UOD9/_old  2017-05-16 14:47:04.662922273 +0200
+++ /var/tmp/diff_new_pack.o0UOD9/_new  2017-05-16 14:47:04.670921149 +0200
@@ -16,9 +16,9 @@
 #
 
 
-%define _tar_path 5.33
+%define _tar_path 5.34
 Name:           kapidox
-Version:        5.33.0
+Version:        5.34.0
 Release:        0
 Requires:       doxygen
 BuildRequires:  fdupes

++++++ kapidox-5.33.0.tar.xz -> kapidox-5.34.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kapidox-5.33.0/setup.py new/kapidox-5.34.0/setup.py
--- old/kapidox-5.33.0/setup.py 2017-03-30 03:11:16.000000000 +0200
+++ new/kapidox-5.34.0/setup.py 2017-05-08 22:04:55.000000000 +0200
@@ -6,7 +6,7 @@
 
 setup(
         name='kapidox',
-        version='5.33.0',
+        version='5.34.0',
         description='KDE API documentation generation tools',
         maintainer = 'Olivier Churlaud',
         maintainer_email = 'oliv...@churlaud.com',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kapidox-5.33.0/src/kapidox/generator.py 
new/kapidox-5.34.0/src/kapidox/generator.py
--- old/kapidox-5.33.0/src/kapidox/generator.py 2017-03-30 03:11:16.000000000 
+0200
+++ new/kapidox-5.34.0/src/kapidox/generator.py 2017-05-08 22:04:55.000000000 
+0200
@@ -37,6 +37,7 @@
 import subprocess
 import tempfile
 import sys
+import xml.etree.ElementTree as ET
 
 import jinja2
 
@@ -621,6 +622,7 @@
         writer.write_entries(
                 GENERATE_MAN=ctx.man_pages,
                 GENERATE_QHP=ctx.qhp)
+
                 #, SEARCHENGINE=ctx.searchengine)
 
         if doxyfile_entries:
@@ -883,3 +885,80 @@
     with open('searchdata.json', 'w') as f:
         for chunk in json.JSONEncoder().iterencode(indexdic):
             f.write(chunk)
+
+def create_qch(products, tagfiles):
+    tag_root = "QtHelpProject"
+    tag_files = "files"
+    tag_filterSection = "filterSection"
+    tag_keywords = "keywords"
+    tag_toc = "toc"
+    for product in products:
+        tree_out = ET.ElementTree(ET.Element("QtHelpProject"))
+        root_out = tree_out.getroot()
+        root_out.set("version", "1.0")
+        namespace = ET.SubElement(root_out, "namespace")
+        namespace.text = "org.kde." + product.name
+        virtualFolder = ET.SubElement(root_out, "virtualFolder")
+        virtualFolder.text = product.name
+        filterSection = ET.SubElement(root_out, tag_filterSection)
+        filterAttribute = ET.SubElement(filterSection, "filterAttribute")
+        filterAttribute.text = "doxygen"
+        toc = ET.SubElement(filterSection, "toc")
+        keywords = ET.SubElement(filterSection, tag_keywords)
+        if len(product.libraries) > 0:
+            if product.libraries[0].part_of_group:
+                product_indexSection = ET.SubElement(toc, "section", {'ref': 
product.name + "/index.html", 'title': product.fancyname})
+        files = ET.SubElement(filterSection, tag_files)
+
+        for lib in sorted(product.libraries, key=lambda lib: lib.name):
+            tree = ET.parse(lib.outputdir + '/html/index.qhp')
+            root = tree.getroot()
+            for child in root.findall(".//*[@ref]"):
+                if lib.part_of_group:
+                    child.attrib['ref'] = lib.name + "/html/" + 
child.attrib['ref']
+                else:
+                    child.attrib['ref'] = "html/" + child.attrib['ref']
+                child.attrib['ref'] = product.name + '/' +child.attrib['ref']
+
+            for child in root.find(".//"+tag_toc):
+                print(child.attrib['ref'])
+                if lib.part_of_group:
+                    product_indexSection.append(child)
+                else:
+                    toc.append(child)
+
+            for child in root.find(".//keywords"):
+                keywords.append(child)
+
+            resources = [
+                "*.json",
+                product.name + "/*.json",
+                product.name +"/" + lib.name +"/html/*.json",
+                product.name + "/*.html",
+                product.name + "/html/*.html",
+                product.name +"/html/*.png",
+                product.name +"/html/*.css",
+                product.name +"/html/*.js",
+                product.name +"/" + lib.name +"/html/*.html",
+                product.name +"/" + lib.name +"/html/*.png",
+                product.name +"/" + lib.name +"/html/*.css",
+                product.name +"/" + lib.name +"/html/*.js",
+                "resources/css/*.css",
+                "resources/3rd-party/bootstrap/css/*.css",
+                "resources/3rd-party/jquery/jquery-3.1.0.min.js",
+                "resources/*.svg",
+                "resources/js/*.js",
+                "resources/icons/*",
+            ]
+            for resource in resources:
+                file_elem = ET.SubElement(files, "file")
+                file_elem.text = resource
+
+        if not os.path.isdir('qch'):
+            os.mkdir('qch')
+
+        name = product.name+".qhp"
+        outname = product.name+".qch"
+        tree_out.write(name, encoding="utf-8", xml_declaration=True)
+        subprocess.call(["qhelpgenerator", name, '-o', 'qch/'+outname])
+        os.remove(name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kapidox-5.33.0/src/kapidox/hlfunctions.py 
new/kapidox-5.34.0/src/kapidox/hlfunctions.py
--- old/kapidox-5.33.0/src/kapidox/hlfunctions.py       1970-01-01 
01:00:00.000000000 +0100
+++ new/kapidox-5.34.0/src/kapidox/hlfunctions.py       2017-05-08 
22:04:55.000000000 +0200
@@ -0,0 +1,132 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+#
+# Copyright 2014  Alex Merry <alex.me...@kdemail.net>
+# Copyright 2014  Aurélien Gâteau <agat...@kde.org>
+# Copyright 2014  Alex Turbov <i.za...@gmail.com>
+# Copyright 2016  Olivier Churlaud <oliv...@churlaud.com>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Python 2/3 compatibility (NB: we require at least 2.7)
+from __future__ import division, absolute_import, print_function, 
unicode_literals
+
+import logging
+import os
+import shutil
+import sys
+import tempfile
+
+if sys.version_info.major < 3:
+    from urllib import urlretrieve
+else:
+    from urllib.request import urlretrieve
+
+from . import generator, utils, argparserutils, preprocessing
+
+try:
+    from kapidox import depdiagram
+    DEPDIAGRAM_AVAILABLE = True
+except ImportError:
+    DEPDIAGRAM_AVAILABLE = False
+
+def do_it(maintainers, copyright, searchpaths=None):
+    if searchpaths is None:
+        searchpaths = searchpaths=['/usr/share/doc/qt5', '/usr/share/doc/qt']
+    utils.setup_logging()
+    args = argparserutils.parse_args(DEPDIAGRAM_AVAILABLE)
+
+    tagfiles = generator.search_for_tagfiles(
+        suggestion=args.qtdoc_dir,
+        doclink=args.qtdoc_link,
+        flattenlinks=args.qtdoc_flatten_links,
+        searchpaths=searchpaths)
+
+    rootdir = args.sourcesdir
+
+    metalist = preprocessing.parse_tree(rootdir)
+    products, groups, libraries, available_platforms = 
preprocessing.sort_metainfo(metalist, maintainers)
+
+    dirsrc = os.path.join(args.doxdatadir, 'htmlresource')
+    dirdest = 'resources'
+    if os.path.isdir(dirdest):
+        shutil.rmtree(dirdest)
+    shutil.copytree(dirsrc, dirdest)
+    os.rename(dirdest+'/favicon.ico', './favicon.ico')
+
+    generator.process_toplevel_html_file('index.html',
+                               args.doxdatadir,
+                               title=args.title,
+                               products=products,
+                               api_searchbox=args.api_searchbox
+                               )
+    generator.process_subgroup_html_files('index.html',
+                                args.doxdatadir,
+                                title=args.title,
+                                groups=groups,
+                                available_platforms=available_platforms,
+                                api_searchbox=args.api_searchbox
+                                )
+    tmp_dir = tempfile.mkdtemp(prefix='kapidox-')
+
+    try:
+        if args.depdiagram_dot_dir:
+            dot_files = utils.find_dot_files(args.depdiagram_dot_dir)
+            assert(dot_files)
+        for lib in libraries:
+            logging.info('# Generating doc for {}'.format(lib.fancyname))
+            if args.depdiagram_dot_dir:
+                png_path = os.path.join(tmp_dir, lib.name) + '.png'
+                ok = generator.generate_diagram(png_path, lib.fancyname,
+                                      dot_files, tmp_dir)
+                if ok:
+                    lib.dependency_diagram = png_path
+            ctx = generator.create_fw_context(args, lib, tagfiles)
+            generator.gen_fw_apidocs(ctx, tmp_dir)
+            tagfiles.append(generator.create_fw_tagfile_tuple(lib))
+
+        # Rebuild for interdependencies
+        for lib in libraries:
+            logging.info('# Rebuilding {} for interdependencies'
+                         .format(lib.fancyname))
+            shutil.rmtree(lib.outputdir)
+            ctx = generator.create_fw_context(args, lib, tagfiles, copyright)
+            generator.gen_fw_apidocs(ctx, tmp_dir)
+            generator.finish_fw_apidocs(ctx, None)
+            logging.info('# Generate indexing files')
+            generator.indexer(lib)
+        logging.info('# Done')
+        for product in products:
+            generator.create_product_index(product)
+            if product.logo_url is not None:
+                logodir = os.path.dirname(product.logo_url)
+                if not os.path.isdir(logodir):
+                    os.mkdir(logodir)
+                shutil.copy(product.logo_url_src, product.logo_url)
+        generator.create_global_index(products)
+        if args.qhp:
+            generator.create_qch(products, tagfiles)
+    finally:
+        if args.keep_temp_dirs:
+            logging.info('Kept temp dir at {}'.format(tmp_dir))
+        else:
+            shutil.rmtree(tmp_dir)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kapidox-5.33.0/src/kapidox/utils.py 
new/kapidox-5.34.0/src/kapidox/utils.py
--- old/kapidox-5.33.0/src/kapidox/utils.py     2017-03-30 03:11:16.000000000 
+0200
+++ new/kapidox-5.34.0/src/kapidox/utils.py     2017-05-08 22:04:55.000000000 
+0200
@@ -264,3 +264,11 @@
         # cause the code to fail
         logging.warning("Getting git info failed: {}".format(exc))
     return _KAPIDOX_VERSION
+
+
+def find_dot_files(dot_dir):
+    """Returns a list of path to files ending with .dot in subdirs of 
`dot_dir`."""
+    lst = []
+    for (root, dirs, files) in os.walk(dot_dir):
+        lst.extend([os.path.join(root, x) for x in files if 
x.endswith('.dot')])
+    return lst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kapidox-5.33.0/src/kapidox_generate 
new/kapidox-5.34.0/src/kapidox_generate
--- old/kapidox-5.33.0/src/kapidox_generate     2017-03-30 03:11:16.000000000 
+0200
+++ new/kapidox-5.34.0/src/kapidox_generate     2017-05-08 22:04:55.000000000 
+0200
@@ -33,9 +33,7 @@
 import logging
 import codecs
 import os
-import shutil
 import sys
-import tempfile
 import time
 import datetime
 
@@ -44,7 +42,7 @@
 else:
     from urllib.request import urlretrieve
 
-from kapidox import generator, utils, argparserutils, preprocessing
+from kapidox import generator, utils, argparserutils, preprocessing, 
hlfunctions
 
 try:
     from kapidox import depdiagram
@@ -53,14 +51,6 @@
     DEPDIAGRAM_AVAILABLE = False
 
 
-def find_dot_files(dot_dir):
-    """Returns a list of path to files ending with .dot in subdirs of 
`dot_dir`."""
-    lst = []
-    for (root, dirs, files) in os.walk(dot_dir):
-        lst.extend([os.path.join(root, x) for x in files if 
x.endswith('.dot')])
-    return lst
-
-
 def download_kde_identities():
     """Download the "accounts" file on the KDE SVN repository in order to get
        the KDE identities with their name and e-mail address
@@ -109,85 +99,12 @@
 
 
 def main():
-    kde_copyright = '1996-' + str(datetime.date.today().year) + ' The KDE 
developers'
     utils.setup_logging()
-    args = argparserutils.parse_args(DEPDIAGRAM_AVAILABLE)
-
-    tagfiles = generator.search_for_tagfiles(
-        suggestion=args.qtdoc_dir,
-        doclink=args.qtdoc_link,
-        flattenlinks=args.qtdoc_flatten_links,
-        searchpaths=['/usr/share/doc/qt5', '/usr/share/doc/qt'])
-
+    kde_copyright = '1996-' + str(datetime.date.today().year) + ' The KDE 
developers'
     maintainers = download_kde_identities()
-    rootdir = args.sourcesdir
 
-    metalist = preprocessing.parse_tree(rootdir)
-    products, groups, libraries, available_platforms = 
preprocessing.sort_metainfo(metalist, maintainers)
-
-    dirsrc = os.path.join(args.doxdatadir, 'htmlresource')
-    dirdest = 'resources'
-    if os.path.isdir(dirdest):
-        shutil.rmtree(dirdest)
-    shutil.copytree(dirsrc, dirdest)
-    os.rename(dirdest+'/favicon.ico', './favicon.ico')
-
-    generator.process_toplevel_html_file('index.html',
-                               args.doxdatadir,
-                               title=args.title,
-                               products=products,
-                               api_searchbox=args.api_searchbox
-                               )
-    generator.process_subgroup_html_files('index.html',
-                                args.doxdatadir,
-                                title=args.title,
-                                groups=groups,
-                                available_platforms=available_platforms,
-                                api_searchbox=args.api_searchbox
-                                )
-    tmp_dir = tempfile.mkdtemp(prefix='kapidox-')
-
-    try:
-        if args.depdiagram_dot_dir:
-            dot_files = find_dot_files(args.depdiagram_dot_dir)
-            assert(dot_files)
-
-        for lib in libraries:
-            logging.info('# Generating doc for {}'.format(lib.fancyname))
-            if args.depdiagram_dot_dir:
-                png_path = os.path.join(tmp_dir, lib.name) + '.png'
-                ok = generator.generate_diagram(png_path, lib.fancyname,
-                                      dot_files, tmp_dir)
-                if ok:
-                    lib.dependency_diagram = png_path
-            ctx = generator.create_fw_context(args, lib, tagfiles)
-            generator.gen_fw_apidocs(ctx, tmp_dir)
-            tagfiles.append(generator.create_fw_tagfile_tuple(lib))
-
-        # Rebuild for interdependencies
-        for lib in libraries:
-            logging.info('# Rebuilding {} for interdependencies'
-                         .format(lib.fancyname))
-            shutil.rmtree(lib.outputdir)
-            ctx = generator.create_fw_context(args, lib, tagfiles, 
kde_copyright)
-            generator.gen_fw_apidocs(ctx, tmp_dir)
-            generator.finish_fw_apidocs(ctx, None)
-            logging.info('# Generate indexing files')
-            generator.indexer(lib)
-        logging.info('# Done')
-        for product in products:
-            generator.create_product_index(product)
-            if product.logo_url is not None:
-                logodir = os.path.dirname(product.logo_url)
-                if not os.path.isdir(logodir):
-                    os.mkdir(logodir)
-                shutil.copy(product.logo_url_src, product.logo_url)
-        generator.create_global_index(products)
-    finally:
-        if args.keep_temp_dirs:
-            logging.info('Kept temp dir at {}'.format(tmp_dir))
-        else:
-            shutil.rmtree(tmp_dir)
+    hlfunctions.do_it(maintainers=maintainers,
+                      copyright=kde_copyright)
 
 
 if __name__ == "__main__":


Reply via email to