Skip to content

Commit

Permalink
Skip image and binary files in replace_and_rename
Browse files Browse the repository at this point in the history
  • Loading branch information
Wentzell committed Sep 13, 2023
1 parent a5ab612 commit 057c239
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions share/replace_and_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,18 @@
# Find the root directory of app4triqs
app4triqs_root = os.path.abspath(os.path.dirname(__file__) + "/..")

# Blacklisted file-formats
fmt_blacklist = ['.png', '.h5', '.jpg', '.ico']

# Recurse over all subdirectories and files
for root, dirs, files in os.walk(app4triqs_root):

for fname in files:
fpath = os.path.join(root, fname)

if os.path.splitext(fname)[1] in fmt_blacklist:
continue

# Ignore certain files / directories
if any(it in fpath for it in ignore_lst): continue

Expand Down

0 comments on commit 057c239

Please sign in to comment.