Chg [generator] cleanup

This commit is contained in:
niclas 2024-02-07 10:36:01 +01:00
parent ee834867b7
commit 8e957aae82

View file

@ -342,41 +342,6 @@ def create_index(galaxies):
index_output += CONTRIBUTING
return index_output
# def create_galaxies(galaxies, cluster_dict):
# galaxy_output = {}
# for galaxie in galaxies:
# galaxy_output[galaxie.json_file_name] = galaxie.create_entry(cluster_dict)
# return galaxy_output
# def create_xy_chart(title, width, height, x_axis, y_axis, bar):
# output = ""
# output += f'```mermaid\n'
# output += f'---\n'
# output += f'config:\n'
# output += f' xyChart:\n'
# output += f' width: {width}\n'
# output += f' height: {height}\n'
# output += f'---\n'
# output += f'xychart-beta\n'
# output += f' title "{title}"\n'
# output += f' x-axis [{x_axis}]\n'
# output += f' y-axis "{y_axis}"\n'
# output += f' bar {bar}\n'
# output += f'```\n'
# output += f'\n'
# return output
# def create_pie_chart(title, cakepieces):
# output = ""
# output += f'```mermaid\n'
# output += f'pie showData\n'
# output += f' title {title}\n'
# for cakepiece in cakepieces:
# output += f' "{cakepiece[0]}" : {cakepiece[1]}\n'
# output += f'```\n'
# output += f'\n'
# return output
def get_top_x(dict, x, big_to_small=True):
sorted_dict = sorted(dict.items(), key=operator.itemgetter(1), reverse=big_to_small)[:x]
top_x = [key for key, value in sorted_dict]