11"""
22This is a python script designed to add a PR
3- based on the created issues of adding new resources
3+ based on the created issues of adding new projects
44
5- 1. include the image to the image folder
6- 2. modified the bioeco_list.json file with the new entry
5+ 1. writes markdown files to projects/.
76
87"""
98import os
@@ -41,7 +40,6 @@ def check_link_availability(test_url):
4140 # Load the contents of the event payload from GITHUB_EVENT_PATH
4241 if DEBUG :
4342 ISSUE_NUM = 7
44- # ISSUE_NUM = 59
4543 else :
4644 event_path = os .environ ['GITHUB_EVENT_PATH' ]
4745 with open (event_path , 'r' ) as event_file :
@@ -64,12 +62,9 @@ def check_link_availability(test_url):
6462
6563 title = issue ['title' ].replace ('[Project Proposal]: ' ,'' )
6664 fname = title .replace (' ' ,'_' )
67- #f = open('../projects/{}.md'.format(fname))
68- #f.write(issue['body'])
69- #f.close()
7065
71- #import os
72- path = os .path .dirname ('../projects/project-{}.md' .format (fname ))
66+ path = os .path .dirname ('/projects/project-{}.md' .format (fname ))
7367 os .makedirs (path , exist_ok = True )
7468 with open ('{}/project-{}.md' .format (path ,fname ), "w" ) as f :
7569 f .write ('## ' + title + '\n \n ' + issue ['body' ])
70+ print ('wrote {}/project-{}.md' .format (path ,fname ))
0 commit comments