3 Star 3 Fork 0

richard132435 / ChinesizeRenpyScript

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
GitbookPrintIndex.py 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
import os
ChineseNum = ['','一', '二', '三', '四', '五', '六', '七', '八', '九']
with open("D:\\GitbookLibrary\\SUMMARY.md","w",encoding="utf-8") as f:
f.write("# /\n")
f.write("* [Introduction/前言](README.md)\n\n")
count = 1
while count < 10 :
f.write("* [Chapter 0"+str(count)+" /第"+ChineseNum[count]+"章 ](0"+str(count)+"/README.md)\n")
index = 1
while index < 10 :
f.write(" * [Section 0"+str(count)+".0"+str(index)+" /](0"+str(count)+" /0"+str(index)+" .md)\n")
index += 1
count += 1
f.write("\n")
while count < 20 :
f.write("* [Chapter "+str(count)+" /第十"+ChineseNum[count-10]+"章 ]("+str(count)+"/README.md)\n")
index = 1
while index < 10 :
f.write(" * [Section "+str(count)+".0"+str(index)+" /]("+str(count)+" /0"+str(index)+" .md)\n")
index += 1
count += 1
f.write("\n")
while count <= 30 :
f.write("* [Chapter "+str(count)+" /第"+ChineseNum[count//10]+"十"+ChineseNum[count%10]+"章 ]("+str(count)+"/README.md)\n")
index = 1
while index < 10 :
f.write(" * [Section "+str(count)+".0"+str(index)+" /]("+str(count)+" /0"+str(index)+" .md)\n")
index += 1
count += 1
f.write("\n")
count = 999
index = 10
while index < 30 :
f.write(" * [Section "+str(count)+"."+str(index)+" /]("+str(count)+" /"+str(index)+" .md)\n")
index += 1
f.close()
Python
1
https://gitee.com/richard132435/chinesize-renpy-script.git
git@gitee.com:richard132435/chinesize-renpy-script.git
richard132435
chinesize-renpy-script
ChinesizeRenpyScript
master

搜索帮助