1
- From 938d6be7ebcb2a640ca67263847c07b1ac813c82 Mon Sep 17 00:00:00 2001
1
+ From 2e3fffea44c3840974cd758ceb550adf1db8e6a0 Mon Sep 17 00:00:00 2001
2
2
From: myfreeer <
[email protected] >
3
- Date: Fri, 31 Dec 2021 21:24:02 +0800
3
+ Date: Sun, 23 Mar 2025 18:34:54 +0800
4
4
Subject: [PATCH] source: use zh localized version
5
5
6
6
---
7
- Makefile | 58 ++++++++++++------------
7
+ Makefile | 57 ++++++++++++------------
8
8
commands/preprocess.py | 21 +++++----
9
9
commands/preprocess_cssless.py | 4 +-
10
10
gadgets/standard_revisions_tests/base.py | 2 +-
@@ -14,16 +14,16 @@ Subject: [PATCH] source: use zh localized version
14
14
preprocess.py | 8 ++--
15
15
tests/test_preprocess.py | 2 +-
16
16
tests/test_preprocess_cssless.py | 2 +-
17
- 10 files changed, 54 insertions(+), 51 deletions(-)
17
+ 10 files changed, 54 insertions(+), 50 deletions(-)
18
18
19
19
diff --git a/Makefile b/Makefile
20
- index 798b79e..e1b4e96 100644
20
+ index 6c4ce10..327b404 100644
21
21
--- a/Makefile
22
22
+++ b/Makefile
23
- @@ -100,18 +100,18 @@ install: all
23
+ @@ -104,14 +104,14 @@ install_html: doc_html
24
24
popd > /dev/null
25
25
26
- # install the devhelp documentation
26
+ install_devhelp: doc_devhelp
27
27
- install -DT -m 644 "output/cppreference-doc-en-c.devhelp2" \
28
28
- "$(DESTDIR)$(bookdir)/cppreference-doc-en-c/cppreference-doc-en-c.devhelp2"
29
29
- install -DT -m 644 "output/cppreference-doc-en-cpp.devhelp2" \
@@ -32,20 +32,16 @@ index 798b79e..e1b4e96 100644
32
32
+ "$(DESTDIR)$(bookdir)/cppreference-doc-zh-c/cppreference-doc-zh-c.devhelp2"
33
33
+ install -DT -m 644 "output/cppreference-doc-zh-cpp.devhelp2" \
34
34
+ "$(DESTDIR)$(bookdir)/cppreference-doc-zh-cpp/cppreference-doc-zh-cpp.devhelp2"
35
- install -DT -m 644 "output/cppreference-doxygen-local.tag.xml" \
36
- "$(DESTDIR)$(bookdir)/cppreference-doxygen-local.tag.xml"
37
- install -DT -m 644 "output/cppreference-doxygen-web.tag.xml" \
38
- "$(DESTDIR)$(bookdir)/cppreference-doxygen-web.tag.xml"
39
35
40
- # install the .qch (Qt Help) documentation
36
+ install_qch: doc_qch
41
37
- install -DT -m 644 "output/cppreference-doc-en-cpp.qch" \
42
38
- "$(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch"
43
39
+ install -DT -m 644 "output/cppreference-doc-zh-cpp.qch" \
44
40
+ "$(DESTDIR)$(docdir)/qch/cppreference-doc-zh-cpp.qch"
45
41
46
- uninstall:
47
- rm -rf "$(DESTDIR)$(docdir)"
48
- @@ -138 ,16 +138 ,16 @@ release: all
42
+ install_doxygen: doc_doxygen
43
+ install -DT -m 644 "output/cppreference-doxygen-local.tag.xml" \
44
+ @@ -144 ,16 +144 ,16 @@ release: all
49
45
50
46
# zip qch
51
47
pushd "output"; \
@@ -66,7 +62,7 @@ index 798b79e..e1b4e96 100644
66
62
67
63
doc_doxygen: output/cppreference-doxygen-web.tag.xml output/cppreference-doxygen-local.tag.xml
68
64
69
- @@ -156 ,32 +156 ,32 @@ output/link-map.xml: output/reference
65
+ @@ -162 ,32 +162 ,32 @@ output/link-map.xml: output/reference
70
66
./build_link_map.py
71
67
72
68
#build the .devhelp2 index
@@ -108,7 +104,7 @@ index 798b79e..e1b4e96 100644
108
104
#build the file list
109
105
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><files>" > "output/qch-files.xml"
110
106
111
- @@ -193 ,7 +193 ,7 @@ output/qch-help-project-cpp.xml: output/cppreference-doc-en-cpp.devhelp2 output/
107
+ @@ -199 ,7 +199 ,7 @@ output/qch-help-project-cpp.xml: output/cppreference-doc-en-cpp.devhelp2 output/
112
108
echo "</files>" >> "output/qch-files.xml"
113
109
114
110
#create the project (copies the file list)
@@ -117,7 +113,7 @@ index 798b79e..e1b4e96 100644
117
113
--dst=output/qch-help-project-cpp.xml \
118
114
--virtual_folder=cpp --file_list=output/qch-files.xml
119
115
120
- @@ -229 ,7 +229 ,7 @@ indexes:
116
+ @@ -235 ,7 +235 ,7 @@ indexes:
121
117
./index2autolinker.py index-functions-c.xml output/indexes/autolink-c
122
118
./index2autolinker.py index-functions-cpp.xml output/indexes/autolink-cpp
123
119
@@ -126,7 +122,7 @@ index 798b79e..e1b4e96 100644
126
122
source:
127
123
rm -rf "reference"
128
124
mkdir "reference"
129
- @@ -238 ,15 +238,15 @@ source:
125
+ @@ -244 ,15 +244,16 @@ source:
130
126
regex=".*index\\.php.*|.*/Special:.*|.*/Talk:.*" \
131
127
regex+="|.*/Help:.*|.*/File:.*|.*/Cppreference:.*" \
132
128
regex+="|.*/WhatLinksHere:.*|.*/Template:.*|.*/Category:.*" \
@@ -144,13 +140,14 @@ index 798b79e..e1b4e96 100644
144
140
- https://en.cppreference.com/w/ ; \
145
141
+ --timeout=5 --tries=180 --no-verbose \
146
142
+ --retry-connrefused --waitretry=2 --read-timeout=13 \
143
+ + --trust-server-names \
147
144
+ https://zh.cppreference.com/w/ ; \
148
145
popd > /dev/null
149
146
150
147
- ./export.py --url=https://en.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
151
148
+ ./export.py --url=https://zh.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
152
149
diff --git a/commands/preprocess.py b/commands/preprocess.py
153
- index f6627ef..6785463 100644
150
+ index e745b8e..4529c6a 100644
154
151
--- a/commands/preprocess.py
155
152
+++ b/commands/preprocess.py
156
153
@@ -43,23 +43,23 @@ def rearrange_archive(root):
@@ -196,7 +193,7 @@ index f6627ef..6785463 100644
196
193
197
194
# make custom footer
198
195
def add_footer(html, root, fn):
199
- - footer = html.xpath(' //*[@id=\ 'footer\']' )[0]
196
+ - footer = html.xpath(" //*[@id='footer']" )[0]
200
197
+ footers = html.xpath('//*[@id=\'footer\']')
201
198
+ if len(footers) == 0:
202
199
+ return
@@ -338,5 +335,5 @@ index 64864cc..b48628b 100644
338
335
339
336
root = function(root)
340
337
- -
341
- 2.30.0
338
+ 2.39.5
342
339
0 commit comments