Skip to content

Commit ead0ec2

Browse files
committedNov 14, 2022
chore: update scripts
1 parent da01870 commit ead0ec2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed
 

‎Script/deploy.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,10 @@ def modify_file(self, title_str, file_path, tags):
100100
if index > 3:
101101
# 去除封面内容
102102
new_content.append(lines[index])
103-
fileHandler.seek(0)
103+
104+
with open(file_path, "w") as fp:
104105
for newline in new_content:
105-
fileHandler.write(newline)
106+
fp.writelines(newline)
106107

107108
def deploy(self):
108109
"""推送仓库"""

‎Script/testScript.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
class MyTestCase(unittest.TestCase):
66

77
def setUp(self):
8-
article_args = ["--name", "bookreview_effective_engineer",
9-
"--tags", "效率,书评"]
8+
article_args = ["--name", "cultivation_for_programmer_booknotes_1",
9+
"--tags", "书评,读书笔记"]
1010
self.builder = BlogArticleBuilder(article_args)
1111

1212
def test_deploy_article(self):

0 commit comments

Comments
 (0)
Please sign in to comment.