示例#1
0
def generate_doc():
    print('Generating doc')
    plugin_list = get_plugin_list()
    plugin_list.fetch_data(fail_hard=False)
    if os.path.isdir(constants.CATALOGUE_FOLDER):
        shutil.rmtree(constants.CATALOGUE_FOLDER)
    os.mkdir(constants.CATALOGUE_FOLDER)

    def write_doc():
        with write_nav(get_root_readme_file_path()) as file:
            with utils.read_file(
                    os.path.join(constants.TEMPLATE_FOLDER,
                                 get_file_name('index_header.md'))) as header:
                file.write(header.read())
            file.write('\n')
            write_label_info(file)
            file.write('-------\n\n')
            generate_index(plugin_list, file)

        generate_labels(plugin_list)
        generate_plugins(plugin_list)

        with write_nav(get_full_index_file_path()) as file:
            generate_full(plugin_list, file)

    for lang in LANGUAGES:
        print('Generating doc in language {}'.format(lang))
        with with_language(lang):
            write_doc()

    print('Generating doc done')
示例#2
0
def check():
	get_plugin_list().fetch_data(meta=True, release=False, fail_hard=True)  # so github api token is not needed
示例#3
0
def update_data():
	plugin_list = get_plugin_list()
	plugin_list.fetch_data(fail_hard=False)
	plugin_list.store_data()
示例#4
0
def check(target_ids: Optional[Collection[str]]):
	get_plugin_list(target_ids).fetch_data(meta=True, release=False, fail_hard=True)  # so github api token is not needed