Skip to content

Conversation

Copy link

Copilot AI commented Dec 15, 2025

Implements functionality to programmatically retrieve metadata from all data source applications (unified hosts and extensions) used by the aggregator.

Changes

  • New API function: get_all_applications() retrieves metadata from all update.json files in data/ and extensions/ directories, returning a list of dicts with source metadata (name, type, URL, license, etc.)

  • CLI interface: Added --list-applications (-l) flag to display all sources with formatted output

  • Implementation: Uses helper function to eliminate duplication between unified/extension source reading. Error messages distinguish source types using print_failure() for consistency.

  • Tests: Added TestGetAllApplications with 2 test cases covering normal and empty results

Usage

# Programmatic access
from updateHostsFile import get_all_applications

apps = get_all_applications()
for app in apps:
    print(f"{app['name']} ({app['type']}): {app['url']}")
# CLI access
python3 updateHostsFile.py --list-applications

Returns metadata including: name, type (unified/extension), description, home URL, data URL, license, update frequency, paused status, and file path.

Original prompt

Ottenere applicazioni API


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits December 15, 2025 15:42
Co-authored-by: Benazzo <67507903+Benazzo@users.noreply.github.com>
Co-authored-by: Benazzo <67507903+Benazzo@users.noreply.github.com>
Co-authored-by: Benazzo <67507903+Benazzo@users.noreply.github.com>
Co-authored-by: Benazzo <67507903+Benazzo@users.noreply.github.com>
Copilot AI changed the title [WIP] Get API applications Add API to retrieve data source applications metadata Dec 15, 2025
Copilot AI requested a review from Benazzo December 15, 2025 15:50
@Benazzo Benazzo marked this pull request as ready for review December 15, 2025 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants