see #6: pdf for english version

This commit is contained in:
Changkun Ou
2018-05-06 15:20:13 +02:00
parent 70250c2b0a
commit 9e18543f65
9 changed files with 6028 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
# !/usr/bin/env python3
# author: changkun<hi@changkun.us>
import os
chapters = ['00-preface.md', '01-intro.md', '02-usability.md', '03-runtime.md', '04-containers.md', '05-pointers.md', '06-regex.md', '07-thread.md', '08-filesystem.md', '09-others.md', '10-cpp20.md', 'appendix.md']
ignores = ['TOC', '返回目录', '许可', 'license']
@@ -13,10 +15,11 @@ copyright: cc-by-nc-nd 4.0
---
""")
for chapter in chapters:
with open(chapter) as ch:
outfile.write('\n')
for line in ch:
if any(keyword in line for keyword in ignores):
continue
else:
outfile.write(line)
if os.path.isfile(chapter):
with open(chapter) as ch:
outfile.write('\n')
for line in ch:
if any(keyword in line for keyword in ignores):
continue
else:
outfile.write(line)

Binary file not shown.