File: make-topic-index

package info (click to toggle)
awscli 2.31.35-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 156,692 kB
  • sloc: python: 213,816; xml: 14,082; makefile: 189; sh: 178; javascript: 8
file content (23 lines) | stat: -rwxr-xr-x 669 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env python
"""This is a script to generate a JSON index for the CLI Topic Guide

Whenever a new topic is added to the awscli/topics directory or a tag
has been modified in a current topic in that directory, this script
**must** be run. The script will scan through all of the topics in the
directory and generate a JSON index that is used by the CLI to link related
topics and commands.
"""

import awscli
from awscli.topictags import TopicTagDB


def main():
    topic_tag_db = TopicTagDB()
    src_files = topic_tag_db.get_all_topic_src_files()
    topic_tag_db.scan(src_files)
    topic_tag_db.save_to_json_index()


if __name__ == '__main__':
    main()