Created
May 9, 2021 08:48
-
-
Save misode/47effa5714e73f1373caa859e05a96ab 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 os | |
commands = 0 | |
for root, dirs, files in os.walk("."): | |
for filename in [f for f in files if f.endswith(".mcfunction")]: | |
with open(os.path.join(root, filename)) as f: | |
commands += len([l for l in f.readlines() if l[0].isalpha()]) | |
print(commands) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment