Skip to content

Commit 23351d1

Browse files
authored
create pde folder (#5)
1 parent fb15917 commit 23351d1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

scripts/to_contribs_txt.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
"""
44

55
import json
6+
import pathlib
7+
import shutil
68
from collections import defaultdict
79

810
from utils import get_valid_contributions
@@ -44,7 +46,13 @@ def read_contribs_text(filepath):
4446

4547

4648
if __name__ == "__main__":
47-
contribs_text_file = '../pde/contribs.txt'
49+
pde_folder = pathlib.Path(__file__).parent.parent / 'pde/'
50+
# remove sources folder if it already exists
51+
if pde_folder.is_dir():
52+
shutil.rmtree(pde_folder)
53+
pde_folder.mkdir(parents=True, exist_ok=True)
54+
55+
contribs_text_file = pde_folder / 'contribs.txt'
4856

4957
contributions_list = get_valid_contributions()
5058

0 commit comments

Comments
 (0)