- Added licenses of apps in FOSS panel
This commit is contained in:
Hamza417
2024-01-10 16:01:50 +05:30
parent 447b434daf
commit aed625efc5
6 changed files with 27 additions and 5443 deletions

View File

@@ -52,12 +52,12 @@ count = 0
def parse_xml(root):
for application in root.findall(".//application"):
app_id = application.get("id")
version_code = application.find(".//versioncode").text
license_ = application.find(".//license").text
# Check for duplicates before adding to the xml_content
global xml_content # use the global xml_content variable
if f'{app_id}' not in xml_content:
xml_content += f' <string name="{app_id}" translatable="false">{version_code}</string>\n'
xml_content += f' <string name="{app_id}" translatable="false">{license_}</string>\n'
global count # use the global count variable
count += 1