To contribute a project or feature, you should only need to make changes to projects.json.
Make changes to projects.json (take note of the project structure)
Re-generate the README.md file:
python3 generate_table.py
python3 -m pytest test_generate_table.py -v
For more involved contributions a description of the main project files are:
projects.json: Contains all projects and their featuresreadme.tpl: Template file for the README (contains static content and `` placeholder)generate_table.py: Python script that generates the table from JSON and validates its integrityreadme.md: Generated output file (the main README)test_generate_table.py: Comprehensive test suite covering all functions and validationThe projects.json file contains two main sections:
Each project requires these mandatory fields:
name: Project namerepo: GitHub repository (owner/repo format)logo_url: URL to project logologo_alt: Alt text for logoOptional standard fields:
branch: Branch name (defaults to “master” for badges)license_custom: Custom license text (overrides GitHub badge)Feature fields: Any feature defined in the features array can be added as:
feature_name: Value indicating the quality of the feature on a scale of 1-10 (“x” means the feature doesn’t exist, and prepending ‘wip-‘ means feature is a work in process)feature_name_url: Optional URL to link to the project’s documentation of the featureExample:
{
"name": "ProjectName",
"repo": "owner/repo",
"branch": "main",
"logo_url": "https://...",
"logo_alt": "Project Logo",
"license_custom": "GPL-3.0",
"web_app": "8",
"web_app_url": "https://demo.example.com",
"ios_app": "x",
"ios_app_url": "https://github.com/owner/repo/issues/123"
...
}
Each feature defines a row in the comparison table:
{
"name": "Feature Name",
"link": "features.md#feature-anchor",
"processor": "generate_default_row",
"description": "Feature description"
}
Processor Types:
generate_logo_row: Special processor for logo displaygenerate_badge_row: GitHub badge generation (requires badge_template, use_lowercase, use_branch)generate_license_row: License badge handlinggenerate_default_row (or null): Score-based row with emoji conversionThe system automatically converts score values to an emoji representation:
"x" → ❌ (not available)"0"-"9" → ✅0️⃣-✅9️⃣ (available with rating)"10" → ✅🔟 (perfect score - used sparingly)"wip-1" → 🚧1️⃣ (work in progress with rating of 1)The validate_projects_json() function ensures data integrity:
✅ Required Fields Check: Validates all projects have name, repo, logo_url, logo_alt ✅ Unmapped Keys Detection: Identifies project keys not mapped to any feature ✅ Error Aggregation: Collects all errors before reporting ✅ Detailed Error Messages: Shows which projects have which unmapped keys
Example validation output:
projects.json validation FAILED:
Project 'App1' is missing fields: {'repo'}
Found 2 project key(s) not mapped to any feature:
• 'invalid_key_1' in: App1, App3
• 'another_bad_key' in: App3
To add a new feature to the comparison table:
projects.json:
{
"features": [
{
"name": "New Feature",
"link": "features.md#new-feature",
"description": "Description of the feature"
}
]
}
{
"projects": [
{
"name": "ProjectName",
"new_feature": "8",
"new_feature_url": "https://example.com/feature"
}
]
}
python3 generate_table.py
The system automatically converts feature names (e.g., “New Feature” → “new_feature”) and handles score-to-emoji conversion.
For specialized row formatting, implement a custom processor in generate_table.py:
def generate_custom_row(projects):
"""Generate a custom-formatted row."""
row = "| [Feature Name](/foss_photo_libraries/features.html#anchor) "
for project in projects:
value = project.get('feature_key', '❌')
# Custom formatting logic here
row += f"| {value} "
row += "|\n"
return row
Then reference it in the feature definition:
{
"name": "Custom Feature",
"processor": "generate_custom_row"
}
The project includes GitHub Actions workflow (.github/workflows/mega-linter.yml) that:
Edit readme.tpl to change the static content around the table. The placeholder `` will be replaced with the generated table.