Created
July 18, 2023 19:17
-
-
Save cborac/94001415905c18030e5e3ba9a466919a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
import shutil | |
try: | |
shutil.rmtree("./export") | |
except Exception: | |
pass | |
os.mkdir("./export") | |
for filename in glob.iglob('./**/*[!.py]', recursive=True): | |
if os.path.isdir(filename) or filename.startswith("./export"): continue | |
path = "./export/"+filename[2:].replace("__.FOS.__", "/") | |
os.makedirs(os.path.dirname(path), exist_ok=True) | |
shutil.copyfile(filename, path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
import shutil | |
try: | |
shutil.rmtree("./import") | |
except Exception: | |
pass | |
os.mkdir("./import") | |
for filename in glob.iglob('./**/*[!.py]', recursive=True): | |
if os.path.isdir(filename) or filename.startswith("./import"): continue | |
shutil.copyfile(filename, "./import/"+filename[2:].replace("/", "__.FOS.__")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment