Skip to content

Commit

Permalink
更新最新的统计
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangzhonglian committed May 18, 2020
1 parent 294b3c2 commit d89cb4f
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 120 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ env:
- GH_UN=jiangzhonglian
- [email protected]
- GH_USER=apachecn
- GH_REPO=pytorch-doc-zh
- GH_REPO=AiLearning
- GH_BRANCH=gh-pages
10 changes: 5 additions & 5 deletions book.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
],
"pluginsConfig": {
"github": {
"url": "https://github.com/apachecn/pytorch-doc-zh"
"url": "https://github.com/apachecn/AiLearning"
},
"github-buttons": {
"buttons": [
{
"user": "apachecn",
"repo": "pytorch-doc-zh",
"repo": "AiLearning",
"type": "star",
"count": true,
"size": "small"
Expand All @@ -51,7 +51,7 @@
"elements": [".gitbook-link"]
},
"edit-link": {
"base": "https://github.com/apachecn/pytorch-doc-zh/blob/master",
"base": "https://github.com/apachecn/AiLearning/blob/master",
"label": "编辑本页"
},
"sharing": {
Expand Down Expand Up @@ -113,7 +113,7 @@
"buttons": [
{
"user": "apachecn",
"repo": "pytorch-doc-zh",
"repo": "AiLearning",
"type": "star",
"count": true,
"size": "small"
Expand Down Expand Up @@ -162,7 +162,7 @@
"noPowered": false
},
"ga": {
"token": "UA-102475051-10"
"token": "UA-127082511-1"
},
"baidu": {
"token": "75439e2cbd22bdd813226000e9dcc12f"
Expand Down
70 changes: 0 additions & 70 deletions index.html

This file was deleted.

34 changes: 0 additions & 34 deletions run_website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,5 @@ python3 src/script.py "home" "powered"
python3 src/script.py "home" "gitalk"
gitbook build ./ _book


# versions="0.2 0.3 0.4 1.0 1.2 1.4 LatestChanges"
# for version in $versions;do
# loginfo "==========================================================="
# loginfo "开始", ${version}, "版本编译"

# echo "cp book.json docs/${version}"
# cp book.json docs/${version}

# # 替换 book.json 的编辑地址
# echo "python3 src/script.py ${version} book"
# python3 src/script.py ${version} "book"

# echo "cp -r node_modules docs/${version}"
# rm -rf docs/${version}/node_modules
# cp -r node_modules docs/${version}

# echo "gitbook install docs/${version}"
# gitbook install docs/${version}

# echo "python3 src/script.py ${version} powered"
# python3 src/script.py ${version} "powered"

# echo "python3 src/script.py ${version} gitalk"
# python3 src/script.py ${version} "gitalk"

# echo "gitbook build docs/${version} _book/docs/${version}"
# gitbook build docs/${version} _book/docs/${version}

# # 注释多余的内容
# # echo "python3 src/script.py ${version} index"
# # python3 src/script.py ${version} "index"
# done

# # rm -rf /opt/apache-tomcat-9.0.17/webapps/test_book
# # cp -r _book /opt/apache-tomcat-9.0.17/webapps/test_book
20 changes: 10 additions & 10 deletions src/script.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ def format_file(filename, str1, str2):
tag = False
else:
filename = "docs/%s/book.json" % version
str1 = "https://github.com/apachecn/pytorch-doc-zh/blob/master"
str2 = "https://github.com/apachecn/pytorch-doc-zh/blob/master/docs/%s" % version
str1 = "https://github.com/apachecn/AiLearning/blob/master"
str2 = "https://github.com/apachecn/AiLearning/blob/master/docs/%s" % version

elif u_type == "powered":
if version == "home":
Expand All @@ -80,10 +80,10 @@ def format_file(filename, str1, str2):
'\\n<hr/>'+
'\\n<div align="center">'+
'\\n <p><a href="http://www.apachecn.org" target="_blank"><font face="KaiTi" size="6" color="red">我们一直在努力</font></a></p>'+
'\\n <p><a href="https://github.com/apachecn/pytorch-doc-zh/" target="_blank">apachecn/pytorch-doc-zh</a></p>'+
'\\n <p><iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=pytorch-doc-zh&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=pytorch-doc-zh&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=pytorch-doc-zh&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <p><a href="https://github.com/apachecn/AiLearning/" target="_blank">apachecn/AiLearning</a></p>'+
'\\n <p><iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=AiLearning&type=watch&count=true&v=2" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=AiLearning&type=star&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <iframe align="middle" src="https://ghbtns.com/github-btn.html?user=apachecn&repo=AiLearning&type=fork&count=true" frameborder="0" scrolling="0" width="100px" height="25px"></iframe>'+
'\\n <a target="_blank" href="//shang.qq.com/wpa/qunwpa?idkey=bcee938030cc9e1552deb3bd9617bbbf62d3ec1647e4b60d9cd6b6e8f78ddc03"><img border="0" src="http://data.apachecn.org/img/logo/ApacheCN-group.png" alt="ML | ApacheCN" title="ML | ApacheCN"></a></p>'+
'\\n</div>'+
'\\n <div style="text-align:center;margin:0 0 10.5px;">'+
Expand All @@ -99,19 +99,19 @@ def format_file(filename, str1, str2):
'\\n var _hmt = _hmt || [];'+
'\\n (function() {'+
'\\n var hm = document.createElement("script");'+
'\\n hm.src = "https://hm.baidu.com/hm.js?38525fdac4b5d4403900b943d4e7dd91";'+
'\\n hm.src = "https://hm.baidu.com/hm.js?33149aa6702022b1203201da06e23d81";'+
'\\n var s = document.getElementsByTagName("script")[0]; '+
'\\n s.parentNode.insertBefore(hm, s);'+
'\\n })();'+
'\\n </script>'+
'\\n'+
'\\n <script async src="https://www.googletagmanager.com/gtag/js?id=UA-102475051-10"></script>'+
'\\n <script async src="https://www.googletagmanager.com/gtag/js?id=UA-127082511-1"></script>'+
'\\n <script>'+
'\\n window.dataLayer = window.dataLayer || [];'+
'\\n function gtag(){dataLayer.push(arguments);}'+
'\\n gtag(\\'js\\', new Date());'+
'\\n'+
'\\n gtag(\\'config\\', \\'UA-102475051-10\\');'+
'\\n gtag(\\'config\\', \\'UA-127082511-1\\');'+
'\\n </script>'+
'\\n</div>'+
'\\n'+
Expand All @@ -129,7 +129,7 @@ def format_file(filename, str1, str2):
'\\n const gitalk = new Gitalk({'+
'\\n clientID: \\'2e62dee5b9896e2eede6\\','+
'\\n clientSecret: \\'ca6819a54656af0d87960af15315320f8a628a53\\','+
'\\n repo: \\'pytorch-doc-zh\\','+
'\\n repo: \\'AiLearning\\','+
'\\n owner: \\'apachecn\\','+
'\\n admin: [\\'jiangzhonglian\\', \\'wizardforcel\\'],'+
'\\n id: md5(location.pathname),'+
Expand Down

0 comments on commit d89cb4f

Please sign in to comment.