aboutsummaryrefslogtreecommitdiffstats
path: root/comments_by_extension.toml
AgeCommit message (Collapse)Author
2018-12-12Add comments_by_extension.tomlTeddy Wing
Based on `comments.toml` but keyed by file extension instead of language name. Generated using the following two scripts with some additional manual modification: convert_file_extension_keys_toml.py: #!/usr/bin/env python3 import toml comments = toml.load('comments.toml') by_extension = {} for language, attributes in comments.items(): if 'extensions' in attributes: value = attributes extensions = value.pop('extensions') value['name'] = language for extension in extensions: by_extension[extension] = value with open('comments_by_extension.toml', 'w') as f: toml.dump(by_extension, f) sort_file_extensions.py: #!/usr/bin/env python3 from collections import OrderedDict import toml comments = toml.load('comments_by_extension.toml') comments = OrderedDict(sorted(comments.items())) with open('comments_by_extension.toml', 'w') as f: toml.dump(comments, f)