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
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bd010ac2a3a8ba7e74cb247ea852e39fc7f37b08de2aaf50f2de17ea3832c432
|
||||
size 6531336
|
||||
3
cppreference-doc-20211127.tar.xz
Normal file
3
cppreference-doc-20211127.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:23561f4b879c1a1bc0a5edbee75bd7139faae740629ad9932f6acf70cf8b0c70
|
||||
size 10678068
|
||||
@@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 15 19:02:35 UTC 2021 - Markus Ebner <info@ebner-markus.de>
|
||||
|
||||
- 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 <badshah400@gmail.com>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (C) 2018 Monika Kairaityte <monika@kibit.lt>
|
||||
#
|
||||
# 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()
|
||||
Reference in New Issue
Block a user