Add latest changelog
This commit is contained in:
+26
-6
@@ -135,11 +135,30 @@ def create_rss_feed(apps_data, feed_name, feed_description, output_file):
|
||||
if description is None:
|
||||
description = ""
|
||||
|
||||
# Append screenshot image to description if available
|
||||
# Build description with sections
|
||||
description_sections = []
|
||||
|
||||
# Add main description
|
||||
if description:
|
||||
description_sections.append('<h3>Description</h3>')
|
||||
description_sections.append(description)
|
||||
|
||||
# Add screenshot if available
|
||||
if 'screenshot_url' in app and app['screenshot_url']:
|
||||
description_sections.append('<h3>Screenshot</h3>')
|
||||
screenshot_url = str(app['screenshot_url'])
|
||||
# Append image as HTML to description
|
||||
description += f'<br/><br/><img src="{screenshot_url}" alt="Screenshot" style="max-width: 100%; height: auto;" />'
|
||||
description_sections.append(f'<img src="{screenshot_url}" alt="Screenshot" style="max-width: 100%; height: auto;" />')
|
||||
|
||||
# Add latest release notes if available
|
||||
if 'latest_release_notes' in app and app['latest_release_notes']:
|
||||
release_notes = str(app['latest_release_notes']).strip()
|
||||
if release_notes:
|
||||
formatted_notes = format_description(release_notes)
|
||||
description_sections.append('<h3>Latest Release Notes</h3>')
|
||||
description_sections.append(formatted_notes)
|
||||
|
||||
# Join all sections
|
||||
final_description = '\n'.join(description_sections)
|
||||
|
||||
# Create a feed entry
|
||||
fe = fg.add_entry()
|
||||
@@ -147,9 +166,9 @@ def create_rss_feed(apps_data, feed_name, feed_description, output_file):
|
||||
fe.title(str(app['title'])) # Ensure title is a string
|
||||
fe.link(href=f'https://repebblesearch.com/apps/{app_id}', rel='alternate')
|
||||
|
||||
# Set description (now includes formatted text and image)
|
||||
if description:
|
||||
fe.description(description)
|
||||
# Set description (now includes all sections with headings)
|
||||
if final_description:
|
||||
fe.description(final_description)
|
||||
else:
|
||||
fe.description("No description available")
|
||||
|
||||
@@ -215,3 +234,4 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user