Skip to content

Commit 4c2cc94

Browse files
committed
Create create_archives.py
1 parent e9befa6 commit 4c2cc94

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

create_archives.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
3+
import os
4+
import shutil
5+
6+
IGNORED_DIRS = [ ".github", ".DS_store", ".git" ]
7+
for category in os.listdir("."):
8+
if os.path.isfile(category) or category in IGNORED_DIRS:
9+
continue
10+
11+
for name in os.listdir(category):
12+
path = os.path.join(category, name)
13+
if os.path.isfile(category) or category in IGNORED_DIRS:
14+
continue
15+
16+
zip_name = category + "_" + name
17+
print("writing zip archive", zip_name)
18+
shutil.make_archive(zip_name, "zip", path)
19+
20+

0 commit comments

Comments
 (0)