Hello community,

here is the log from the commit of package cppreference-doc for 
openSUSE:Leap:15.2 checked in at 2020-05-24 18:08:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/cppreference-doc (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.cppreference-doc.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cppreference-doc"

Sun May 24 18:08:57 2020 rev:1 rq:808479 version:20190607

Changes:
--------
New Changes file:

--- /dev/null   2020-04-14 14:47:33.391806949 +0200
+++ 
/work/SRC/openSUSE:Leap:15.2/.cppreference-doc.new.2738/cppreference-doc.changes
    2020-05-24 18:08:58.510146214 +0200
@@ -0,0 +1,19 @@
+-------------------------------------------------------------------
+Tue Aug 27 00:46:55 UTC 2019 - Atri Bhattacharya <[email protected]>
+
+- Update to version 20190607:
+  + List of changes unavailable from upstream.
+- Drop Fix-qch-build.patch: incorporate upstream.
+- Add a build script missed by upstream tarball
+  (preprocess_qch.py).
+- New build dependency: python3-premailer.
+
+-------------------------------------------------------------------
+Tue Apr  9 12:53:45 UTC 2019 - Christophe Giboudeaux <[email protected]>
+
+- Add Fix-qch-build.patch to fix the qch generation.
+
+-------------------------------------------------------------------
+Wed Mar 28 08:40:30 UTC 2018 - [email protected]
+
+- Initial version

New:
----
  cppreference-doc-20190607.tar.xz
  cppreference-doc.changes
  cppreference-doc.spec
  preprocess_qch.py

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

Other differences:
------------------
++++++ cppreference-doc.spec ++++++
#
# spec file for package cppreference-doc
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           cppreference-doc
Version:        20190607 
Release:        0
Summary:        Cppreference documentation for offline reading
License:        CC-BY-SA-3.0
Group:          Documentation/HTML
Url:            http://en.cppreference.com/w/
Source0:        
http://upload.cppreference.com/mwiki/images/8/80/cppreference-doc-20190607.tar.xz
# SECTION Manually bundle build script missed by upstream tarball
Source1:        
https://raw.githubusercontent.com/p12tic/cppreference-doc/v20190607/preprocess_qch.py
# /SECTION
BuildRequires:  devhelp
BuildRequires:  fdupes
BuildRequires:  libqt5-qttools
BuildRequires:  python3-lxml
BuildRequires:  python3-premailer
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Cppreference is a complete online reference for the C and C++ languages and 
standard libraries, i.e. a more convenient version of the C and C++ standards. 
This package provides an offline mirror of the reference.

%package devhelp
Summary:        Cppreference documentation for offline reading - devhelp version
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description devhelp
Cppreference is a complete online reference for the C and C++ languages and 
standard libraries, i.e. a more convenient version of the C and C++ standards. 
This package provides an offline mirror of the reference in the devhelp format.

This package provides the documentation in the devhelp format.


%package qhelp
Summary:        Cppreference documentation for offline reading - qhelp version
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description qhelp
Cppreference is a complete online reference for the C and C++ languages and 
standard libraries, i.e. a more convenient version of the C and C++ standards. 
This package provides an offline mirror of the reference in the devhelp format.

This package provides the documentation in the qhelp format.

%prep
%setup -q
cp %{S:1} ./
chmod +x preprocess_qch.py

%build
make %{?_smp_mflags} qhelpgenerator=qhelpgenerator-qt5

%install
%make_install

rm %{buildroot}%{_datadir}/devhelp/books/cppreference-doxygen*.xml

%fdupes %{buildroot}%{_datadir}/cppreference/

%files
%doc README.md
%dir %{_datadir}/cppreference
%dir %{_datadir}/cppreference/doc
%{_datadir}/cppreference/doc/html/

%files devhelp
%{_datadir}/devhelp/books/cppreference-doc-en-c/
%{_datadir}/devhelp/books/cppreference-doc-en-cpp/

%files qhelp
%dir %{_datadir}/cppreference/doc/qch
%{_datadir}/cppreference/doc/qch/

%changelog
++++++ preprocess_qch.py ++++++
#!/usr/bin/env python3

#   Copyright (C) 2018  Monika Kairaityte <[email protected]>
#
#   This file is part of cppreference-doc
#
#   This program is free software: you can redistribute it and/or modify
#   it under the terms of the GNU General Public License as published by
#   the Free Software Foundation, either version 3 of the License, or
#   (at your option) any later version.
#
#   This program is distributed in the hope that it will be useful,
#   but WITHOUT ANY WARRANTY; without even the implied warranty of
#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#   GNU General Public License for more details.
#
#   You should have received a copy of the GNU General Public License
#   along with this program.  If not, see http://www.gnu.org/licenses/.

import argparse
import concurrent.futures
import os
import shutil
from commands import preprocess_cssless


def main():
    parser = argparse.ArgumentParser(prog='preprocess_qch.py')
    parser.add_argument(
        '--src', required=True, type=str,
        help='Source directory where raw website copy resides')

    parser.add_argument(
        '--dst', required=True, type=str,
        help='Destination folder to put preprocessed archive to')

    parser.add_argument(
        '--verbose', action='store_true', default=False,
        help='If set, verbose output is produced')
    args = parser.parse_args()

    source_root = args.src
    dest_root = args.dst
    verbose = args.verbose

    if os.path.isdir(dest_root):
        shutil.rmtree(dest_root)

    paths_list = []
    for root, _, files in os.walk(source_root):
        for file in files:
            if file.endswith(".html"):
                src_path = os.path.join(root, file)
                rel_path = os.path.relpath(src_path, source_root)
                dst_path = os.path.join(dest_root, rel_path)
                paths_list.append((src_path, dst_path))

    with concurrent.futures.ProcessPoolExecutor() as executor:
        futures = [
            executor.submit(preprocess_cssless.preprocess_html_merge_cssless,
                            src_path, dst_path)
            for src_path, dst_path in paths_list
        ]

        for i, future in enumerate(futures):
            print('Processing file: {}/{}: {}'.format(
                    i, len(paths_list), paths_list[i][1]))
            output = future.result()
            if verbose:
                print(output)


if __name__ == "__main__":
    main()

Reply via email to