We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fb15917 commit 23351d1Copy full SHA for 23351d1
scripts/to_contribs_txt.py
@@ -3,6 +3,8 @@
3
"""
4
5
import json
6
+import pathlib
7
+import shutil
8
from collections import defaultdict
9
10
from utils import get_valid_contributions
@@ -44,7 +46,13 @@ def read_contribs_text(filepath):
44
46
45
47
48
if __name__ == "__main__":
- 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'
56
57
contributions_list = get_valid_contributions()
58
0 commit comments