Skip to content

Commit

Permalink
云图修改
Browse files Browse the repository at this point in the history
  • Loading branch information
Paper-Dragon committed Nov 5, 2023
1 parent 44c4a27 commit 7ae3f49
Show file tree
Hide file tree
Showing 6 changed files with 2,385 additions and 116 deletions.
16 changes: 15 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,18 @@ def create_wordlouod(wordcloud_item: dict = {"Shanghai": 30, "Beijing": 40}):
wordcloud.to_file(f'{OUTPUT_IMG_NAME}')


create_wordlouod(wordcloud_item=word_frequency(MARKDOWN_ROOT_PATH, key_nums=400))
def create_front_list():
word_dict = word_frequency(MARKDOWN_ROOT_PATH, key_nums=400)
print(word_dict)
out = []
for key, value in word_dict.items():
out.append({"name": key, "value": value})
print(out)


def wordcloud_image():
create_wordlouod(wordcloud_item=word_frequency(MARKDOWN_ROOT_PATH, key_nums=400))


if __name__ == '__main__':
wordcloud_image()
Loading

0 comments on commit 7ae3f49

Please sign in to comment.