print("\t%s --- already done" % (citeKey)) counter -= 1 # WordCloud: # colormap: https://matplotlib.org/3.3.3/tutorials/colors/colormaps.html # font_path="./fonts/Baskerville.ttc" (path to where your font is) # Documentation: https://amueller.github.io/word_cloud/index.html #input("Check the plot!") ########################################################### # PROCESS ALL RECORDS: WITH PROMPT ######################## ########################################################### print(""" ============= GENERATING WORDCLOUDS =============== Type "YES", if you want to regenerate new files; Old files will be deleted and new ones regenerated; Press `Enter` to continue generating missing files. =================================================== """) response = input() if response.lower() == "yes": print("Deleting existing files...") functions.removeFilesOfType(settings["path_to_memex"], "_wCloud.jpg") print("Generating new files...") generateTfIdfWordClouds(settings["path_to_memex"]) else: print("Getting back to generating missing files...") generateTfIdfWordClouds(settings["path_to_memex"])
# colormap: https://matplotlib.org/3.3.3/tutorials/colors/colormaps.html # font_path="./fonts/Baskerville.ttc" (path to where your font is) # Documentation: https://amueller.github.io/word_cloud/index.html #input("Check the plot!") ########################################################### # PROCESS ALL RECORDS: WITH PROMPT ######################## ########################################################### # tfIdf values will change if you add stuff to memex, asks if I want to update my files print(""" ============= GENERATING WORDCLOUDS =============== Type "YES", if you want to regenerate new files; Old files will be deleted and new ones regenerated; Press `Enter` to continue generating missing files. =================================================== """) response = input() if response.lower() == "yes": print("Deleting existing files...") functions.removeFilesOfType( settings["path_to_memex"], "_wCloud.jpg") #removes existing fiels and generates new ones print("Generating new files...") generateTfIdfWordClouds( settings["path_to_memex"] ) #function checks if it already exists, thats why it has to be removed first else: print("Getting back to generating missing files...") generateTfIdfWordClouds(settings["path_to_memex"])
# WordCloud: # colormap: https://matplotlib.org/3.3.3/tutorials/colors/colormaps.html # font_path="./fonts/Baskerville.ttc" (path to where your font is) # Documentation: https://amueller.github.io/word_cloud/index.html #input("Check the plot!") ########################################################### # PROCESS ALL RECORDS: WITH PROMPT ######################## ########################################################### print(""" ============= GENERATING WORDCLOUDS =============== Type "YES", if you want to regenerate new files; Old files will be deleted and new ones regenerated; Press `Enter` to continue generating missing files. =================================================== """) response = input() if response.lower() == "yes": print("Deleting existing files...") functions.removeFilesOfType(memexPath, "wordcloud.jpg", "silent") print("Generating new files...") generateTfIdfWordClouds(memexPath) else: print("Getting back to generating missing files...") generateTfIdfWordClouds(memexPath)
else: print("\t%s --- already done" % (citeKey)) #print that a jpg-file with the wordcloud has already been saved counter -= 1 #subtract the already existing file # WordCloud: # colormap: https://matplotlib.org/3.3.3/tutorials/colors/colormaps.html # font_path="./fonts/Baskerville.ttc" (path to where your font is) # Documentation: https://amueller.github.io/word_cloud/index.html #input("Check the plot!") ########################################################### # PROCESS ALL RECORDS: WITH PROMPT ######################## ########################################################### print(""" ============= GENERATING WORDCLOUDS =============== Type "YES", if you want to regenerate new files; Old files will be deleted and new ones regenerated; Press `Enter` to continue generating missing files. =================================================== """) #print a statement so that the user can decide whether they want to regenerate existing files as well response = input() if response.lower() == "yes": #if they want to regenerate existing files as well print("Deleting existing files...") #print a statement that informs about this process functions.removeFilesOfType(settings["path_to_memex"], "_wCloud.jpg") #remove these old files print("Generating new files...") #print a statement that keeps the user updated generateTfIdfWordClouds(settings["path_to_memex"]) #create the new jpg-files with the wordclouds else: #if they only want to generate missing files print("Getting back to generating missing files...") #print a statement that keeps the user updated generateTfIdfWordClouds(settings["path_to_memex"]) #create the missing jpg-files with the wordclouds
else: print("\t%s --- already done" % (citeKey)) #prints that a jpg-file with the wordcloud has already been saved counter -= 1 #minus one for every file # WordCloud: # colormap: https://matplotlib.org/3.3.3/tutorials/colors/colormaps.html # font_path="./fonts/Baskerville.ttc" (path to where your font is) # Documentation: https://amueller.github.io/word_cloud/index.html #input("Check the plot!") ########################################################### # PROCESS ALL RECORDS: WITH PROMPT ######################## ########################################################### print(""" ============= GENERATING WORDCLOUDS =============== Type "YES", if you want to regenerate new files; Old files will be deleted and new ones regenerated; Press `Enter` to continue generating missing files. =================================================== """) #prints the statement response = input() #asks you to type yes if response.lower() == "yes": #if yes print("Deleting existing files...") #starts deleting existing files functions.removeFilesOfType(settings["path_to_memex"], "_wCloud.jpg") #calls to the function from functionsfile, removes the _wCloud.jpg". print("Generating new files...") #prints the line generateTfIdfWordClouds(settings["path_to_memex"]) #generates the new files to path_to_memex else: print("Getting back to generating missing files...") #if not, prints this generateTfIdfWordClouds(settings["path_to_memex"])#generates the new files to path to memex