-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from halfrost/add_hugo
generate PDF version
- Loading branch information
Showing
9 changed files
with
40 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
|
||
|
||
### 题目 | ||
## 题目 | ||
|
||
Write a class `RecentCounter` to count recent requests. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
|
||
|
||
### 题目 | ||
## 题目 | ||
|
||
Write a class `RecentCounter` to count recent requests. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import os | ||
from os.path import join | ||
from shutil import move | ||
import glob | ||
|
||
content = [] | ||
oneFile = 'ChapterTwo_OnePDF.md' | ||
current_working_dir = os.getcwd() | ||
# print(f"current_working_dir: {current_working_dir}") | ||
|
||
dir_names = glob.glob("*.md") | ||
dir_names.sort() | ||
# print(dir_names) | ||
print(len(dir_names)) | ||
for file_name in dir_names: | ||
# print(file_name) | ||
with open(file_name, "r") as myfile: | ||
content = myfile.read() | ||
with open(oneFile, "a") as myfile: | ||
myfile.write("\n") | ||
myfile.write(content) | ||
myfile.write("\n") | ||
|
||
print("Finished") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters