Skip to content

Commit b1171ad

Browse files
committed
diff: rebase and add trust-server-names
#28
1 parent b1978bf commit b1171ad

File tree

2 files changed

+27
-29
lines changed

2 files changed

+27
-29
lines changed

zh-p12tic.diff

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
From 8c67452b3c7b941b8d9155e49e79c39a898390f9 Mon Sep 17 00:00:00 2001
1+
From ecf13bf2fd5c3d4c4586e9a3b939ca81a6d91524 Mon Sep 17 00:00:00 2001
22
From: myfreeer <[email protected]>
3-
Date: Fri, 12 Feb 2021 17:23:50 +0800
3+
Date: Sun, 23 Mar 2025 18:30:03 +0800
44
Subject: [PATCH] source: use zh localized version
55

66
---
7-
Makefile | 56 ++++++++++++------------
7+
Makefile | 57 ++++++++++++------------
88
commands/preprocess.py | 16 +++----
99
commands/preprocess_cssless.py | 4 +-
1010
gadgets/standard_revisions_tests/base.py | 2 +-
@@ -14,10 +14,10 @@ Subject: [PATCH] source: use zh localized version
1414
preprocess.py | 8 ++--
1515
tests/test_preprocess.py | 2 +-
1616
tests/test_preprocess_cssless.py | 2 +-
17-
10 files changed, 49 insertions(+), 49 deletions(-)
17+
10 files changed, 50 insertions(+), 49 deletions(-)
1818

1919
diff --git a/Makefile b/Makefile
20-
index 644e3a5..90a2c0b 100644
20+
index 644e3a5..ab4f477 100644
2121
--- a/Makefile
2222
+++ b/Makefile
2323
@@ -98,18 +98,18 @@ install: all
@@ -131,7 +131,7 @@ index 644e3a5..90a2c0b 100644
131131
source:
132132
rm -rf "reference"
133133
mkdir "reference"
134-
@@ -246,15 +246,15 @@ source:
134+
@@ -246,15 +246,16 @@ source:
135135
regex=".*index\\.php.*|.*/Special:.*|.*/Talk:.*" \
136136
regex+="|.*/Help:.*|.*/File:.*|.*/Cppreference:.*" \
137137
regex+="|.*/WhatLinksHere:.*|.*/Template:.*|.*/Category:.*" \
@@ -149,6 +149,7 @@ index 644e3a5..90a2c0b 100644
149149
- http://en.cppreference.com/w/ ; \
150150
+ --timeout=5 --tries=180 --no-verbose \
151151
+ --retry-connrefused --waitretry=5 --read-timeout=15 \
152+
+ --trust-server-names \
152153
+ https://zh.cppreference.com/w/ ; \
153154
popd > /dev/null
154155

@@ -331,5 +332,5 @@ index 64864cc..b48628b 100644
331332

332333
root = function(root)
333334
--
334-
2.30.0
335+
2.39.5
335336

zh.diff

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
From 938d6be7ebcb2a640ca67263847c07b1ac813c82 Mon Sep 17 00:00:00 2001
1+
From 2e3fffea44c3840974cd758ceb550adf1db8e6a0 Mon Sep 17 00:00:00 2001
22
From: myfreeer <[email protected]>
3-
Date: Fri, 31 Dec 2021 21:24:02 +0800
3+
Date: Sun, 23 Mar 2025 18:34:54 +0800
44
Subject: [PATCH] source: use zh localized version
55

66
---
7-
Makefile | 58 ++++++++++++------------
7+
Makefile | 57 ++++++++++++------------
88
commands/preprocess.py | 21 +++++----
99
commands/preprocess_cssless.py | 4 +-
1010
gadgets/standard_revisions_tests/base.py | 2 +-
@@ -14,16 +14,16 @@ Subject: [PATCH] source: use zh localized version
1414
preprocess.py | 8 ++--
1515
tests/test_preprocess.py | 2 +-
1616
tests/test_preprocess_cssless.py | 2 +-
17-
10 files changed, 54 insertions(+), 51 deletions(-)
17+
10 files changed, 54 insertions(+), 50 deletions(-)
1818

1919
diff --git a/Makefile b/Makefile
20-
index 798b79e..e1b4e96 100644
20+
index 6c4ce10..327b404 100644
2121
--- a/Makefile
2222
+++ b/Makefile
23-
@@ -100,18 +100,18 @@ install: all
23+
@@ -104,14 +104,14 @@ install_html: doc_html
2424
popd > /dev/null
2525

26-
# install the devhelp documentation
26+
install_devhelp: doc_devhelp
2727
- install -DT -m 644 "output/cppreference-doc-en-c.devhelp2" \
2828
- "$(DESTDIR)$(bookdir)/cppreference-doc-en-c/cppreference-doc-en-c.devhelp2"
2929
- install -DT -m 644 "output/cppreference-doc-en-cpp.devhelp2" \
@@ -32,20 +32,16 @@ index 798b79e..e1b4e96 100644
3232
+ "$(DESTDIR)$(bookdir)/cppreference-doc-zh-c/cppreference-doc-zh-c.devhelp2"
3333
+ install -DT -m 644 "output/cppreference-doc-zh-cpp.devhelp2" \
3434
+ "$(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"
3935

40-
# install the .qch (Qt Help) documentation
36+
install_qch: doc_qch
4137
- install -DT -m 644 "output/cppreference-doc-en-cpp.qch" \
4238
- "$(DESTDIR)$(docdir)/qch/cppreference-doc-en-cpp.qch"
4339
+ install -DT -m 644 "output/cppreference-doc-zh-cpp.qch" \
4440
+ "$(DESTDIR)$(docdir)/qch/cppreference-doc-zh-cpp.qch"
4541

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
4945

5046
# zip qch
5147
pushd "output"; \
@@ -66,7 +62,7 @@ index 798b79e..e1b4e96 100644
6662

6763
doc_doxygen: output/cppreference-doxygen-web.tag.xml output/cppreference-doxygen-local.tag.xml
6864

69-
@@ -156,32 +156,32 @@ output/link-map.xml: output/reference
65+
@@ -162,32 +162,32 @@ output/link-map.xml: output/reference
7066
./build_link_map.py
7167

7268
#build the .devhelp2 index
@@ -108,7 +104,7 @@ index 798b79e..e1b4e96 100644
108104
#build the file list
109105
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?><files>" > "output/qch-files.xml"
110106

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/
112108
echo "</files>" >> "output/qch-files.xml"
113109

114110
#create the project (copies the file list)
@@ -117,7 +113,7 @@ index 798b79e..e1b4e96 100644
117113
--dst=output/qch-help-project-cpp.xml \
118114
--virtual_folder=cpp --file_list=output/qch-files.xml
119115

120-
@@ -229,7 +229,7 @@ indexes:
116+
@@ -235,7 +235,7 @@ indexes:
121117
./index2autolinker.py index-functions-c.xml output/indexes/autolink-c
122118
./index2autolinker.py index-functions-cpp.xml output/indexes/autolink-cpp
123119

@@ -126,7 +122,7 @@ index 798b79e..e1b4e96 100644
126122
source:
127123
rm -rf "reference"
128124
mkdir "reference"
129-
@@ -238,15 +238,15 @@ source:
125+
@@ -244,15 +244,16 @@ source:
130126
regex=".*index\\.php.*|.*/Special:.*|.*/Talk:.*" \
131127
regex+="|.*/Help:.*|.*/File:.*|.*/Cppreference:.*" \
132128
regex+="|.*/WhatLinksHere:.*|.*/Template:.*|.*/Category:.*" \
@@ -144,13 +140,14 @@ index 798b79e..e1b4e96 100644
144140
- https://en.cppreference.com/w/ ; \
145141
+ --timeout=5 --tries=180 --no-verbose \
146142
+ --retry-connrefused --waitretry=2 --read-timeout=13 \
143+
+ --trust-server-names \
147144
+ https://zh.cppreference.com/w/ ; \
148145
popd > /dev/null
149146

150147
- ./export.py --url=https://en.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
151148
+ ./export.py --url=https://zh.cppreference.com/mwiki reference/cppreference-export-ns0,4,8,10.xml 0 4 8 10
152149
diff --git a/commands/preprocess.py b/commands/preprocess.py
153-
index f6627ef..6785463 100644
150+
index e745b8e..4529c6a 100644
154151
--- a/commands/preprocess.py
155152
+++ b/commands/preprocess.py
156153
@@ -43,23 +43,23 @@ def rearrange_archive(root):
@@ -196,7 +193,7 @@ index f6627ef..6785463 100644
196193

197194
# make custom footer
198195
def add_footer(html, root, fn):
199-
- footer = html.xpath('//*[@id=\'footer\']')[0]
196+
- footer = html.xpath("//*[@id='footer']")[0]
200197
+ footers = html.xpath('//*[@id=\'footer\']')
201198
+ if len(footers) == 0:
202199
+ return
@@ -338,5 +335,5 @@ index 64864cc..b48628b 100644
338335

339336
root = function(root)
340337
--
341-
2.30.0
338+
2.39.5
342339

0 commit comments

Comments
 (0)