Files: d40d4eb7917990aa2e886b6827155eef378f567d / asanas / gather_kriyas.py
470 bytesRaw
1 | import os |
2 | import collections |
3 | import configparser |
4 | #Lists for Kriyas and where to find them |
5 | kriya_dict = collections.OrderedDict() |
6 | kriya_list = [] |
7 | |
8 | def main(): |
9 | for file in os.listdir('kriyas'): |
10 | kriya = 'kriyas/{}'.format(file) |
11 | config = configparser.ConfigParser() |
12 | config.read(kriya) |
13 | for section in config.sections(): |
14 | kriya_dict[section] = kriya |
15 | kriya_list.append(section) |
16 | |
17 | if __name__ == "__main__": |
18 | main() |
19 | |
20 |
Built with git-ssb-web