Additionally, I prepared a python script to edit the fedora_flatpak_packages_name_ref.txt and flathub_flatpak_packages_name_ref.txt files and export them to csv files. csv content is as follows: application name, application installation name. Python code is as follows:
import csv
# Input and output file names
input_file = "input_flatpak_packages_name_ref.txt" # input file
output_file = "output_flatpak_packages_name_ref_duzgun.csv" # output file
# Open and process the file
with open(input_file, "r", encoding="utf-8") as infile, open(output_file, "w", newline='', encoding="utf-8") as outfile:
csvwriter = csv.writer(outfile)
for line in infile:
# Cut line at last space
parts = line.rsplit("\t", 1) # Separate from the right by the last space
if len(parts) == 2:
app_name = parts[0].strip() # Application name section
app_part = parts[1].strip() # The part after the space
# Get between first and second / sign
processed_name = app_part.split("/")[1] # Get after first /
processed_name = processed_name.split("/")[0] # Take before second /
# Write application name and rendered name to CSV
csvwriter.writerow([app_name, processed_name])
print(f"Data was successfully written to {output_file}.")
Replace input_flatpak_packages_name_ref.txt with the name of the file. Repeat the process for both txt files.
Replace output_flatpak_packages_name_ref_duzgun with the name of the file. for example: flathub_flatpak_packages_name_ref_duzgun.csv . Repeat the process for both files.
The reason I prepared these csv files was so that the artificial intelligence could at least synchronize the name of the flatpak applications with the installation names of the applications.