Last active
January 16, 2020 01:26
-
-
Save ivanhercaz/24ea9aacdd0e153af67481e02b58b1ad to your computer and use it in GitHub Desktop.
a small script to count files in subdirs and create a graph with Plotly (and then show it in a website created with Flask)
This file contains 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
directories = [pages_dir for pages_dir in dirs if "pages" in pages_dir] | |
for directory in directories: | |
print(directory) | |
for subdir in next(os.walk(f"{directory}"))[1]: | |
print(subdir) | |
print(len(next(os.walk(f"{directory}/{subdir}"))[2])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment