File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 14
14
所以,我打算写个脚本,用于生成月刊,这样如果修改了通用内容部分,就只需要重新生成月刊,而不需要
15
15
手动修改已发布的所有期的内容。
16
16
"""
17
+ from __future__ import print_function
17
18
import sys
18
19
import os
19
20
@@ -34,7 +35,7 @@ def check_path(path):
34
35
检查路径是否存在
35
36
"""
36
37
if not os .path .exists (path ):
37
- print 'not exist: {path}' .format (path = path )
38
+ print ( 'not exist: {path}' .format (path = path ) )
38
39
return False
39
40
else :
40
41
return True
@@ -64,7 +65,7 @@ def make_content(num):
64
65
output_data = temple_data .replace (CONTENT_FLAG , content_data )
65
66
66
67
write_file (os .path .join (output_path , 'HelloGitHub{num}.md' .format (num = num )), output_data )
67
- print 'Make 《GitHub月刊{num}》 successful!' .format (num = num )
68
+ print ( 'Make 《GitHub月刊{num}》 successful!' .format (num = num ) )
68
69
69
70
70
71
def make_all_content ():
You can’t perform that action at this time.
0 commit comments