From bb576349c95b344ca17f1618f6ffcd26ff239ee97d80de8b71ac0dd485853509 Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Thu, 16 Dec 2021 13:01:37 +0000 Subject: [PATCH] Accepting request 940786 from home:seijikun:branches:Documentation - Update to (unofficial) version 20211127 (PeterFeicht's fork, that is also mentioned on the cppreference.com Archive page) - Removed preprocess_qch.py - now bundled in source OBS-URL: https://build.opensuse.org/request/show/940786 OBS-URL: https://build.opensuse.org/package/show/Documentation/cppreference-doc?expand=0&rev=7 --- cppreference-doc-20190607.tar.xz | 3 -- cppreference-doc-20211127.tar.xz | 3 ++ cppreference-doc.changes | 7 +++ cppreference-doc.spec | 14 ++---- preprocess_qch.py | 74 -------------------------------- 5 files changed, 14 insertions(+), 87 deletions(-) delete mode 100644 cppreference-doc-20190607.tar.xz create mode 100644 cppreference-doc-20211127.tar.xz delete mode 100644 preprocess_qch.py diff --git a/cppreference-doc-20190607.tar.xz b/cppreference-doc-20190607.tar.xz deleted file mode 100644 index 2051c91..0000000 --- a/cppreference-doc-20190607.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bd010ac2a3a8ba7e74cb247ea852e39fc7f37b08de2aaf50f2de17ea3832c432 -size 6531336 diff --git a/cppreference-doc-20211127.tar.xz b/cppreference-doc-20211127.tar.xz new file mode 100644 index 0000000..37428fe --- /dev/null +++ b/cppreference-doc-20211127.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:23561f4b879c1a1bc0a5edbee75bd7139faae740629ad9932f6acf70cf8b0c70 +size 10678068 diff --git a/cppreference-doc.changes b/cppreference-doc.changes index 0b34702..dbc6bbe 100644 --- a/cppreference-doc.changes +++ b/cppreference-doc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Dec 15 19:02:35 UTC 2021 - Markus Ebner + +- Update to version 20211127 + (Switched to PeterFeicht's repository, which has new releases) +- Removed preprocess_qch.py - now bundled in source + ------------------------------------------------------------------- Tue Aug 27 00:46:55 UTC 2019 - Atri Bhattacharya diff --git a/cppreference-doc.spec b/cppreference-doc.spec index 6603d54..f5e9025 100644 --- a/cppreference-doc.spec +++ b/cppreference-doc.spec @@ -1,7 +1,7 @@ # # spec file for package cppreference-doc # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,16 +17,13 @@ Name: cppreference-doc -Version: 20190607 +Version: 20211127 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 +URL: http://en.cppreference.com/w/ +Source0: https://github.com/PeterFeicht/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz BuildRequires: devhelp BuildRequires: fdupes BuildRequires: libqt5-qttools @@ -48,7 +45,6 @@ Cppreference is a complete online reference for the C and C++ languages and stan This package provides the documentation in the devhelp format. - %package qhelp Summary: Cppreference documentation for offline reading - qhelp version Group: Documentation/Other @@ -61,8 +57,6 @@ 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 diff --git a/preprocess_qch.py b/preprocess_qch.py deleted file mode 100644 index 1179043..0000000 --- a/preprocess_qch.py +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env python3 - -# Copyright (C) 2018 Monika Kairaityte -# -# 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()