Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
119 changes: 119 additions & 0 deletions .github/scripts/update_manifests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import subprocess
import os
import yaml
import glob
import sys

def get_git_dates(path):
# Get all commit dates for the path
try:
# Define patterns for commits to ignore (automated metadata updates)
ignore_patterns = [
"Add timestamp metadata",
"Implement sorting by newest",
"Merge updated-apps",
"Fix YAML formatting",
"Update manifest metadata",
"Merge branch",
"Tag consolidation",
"llm generated categories",
"Fix Updates and script",
"Fix updated ts",
"Fix tags",
"Implement sorting by newest and last updated in app viewer"
]
ignore_regex = "|".join(ignore_patterns)

# Use TZ=UTC to get dates in UTC format.
env = os.environ.copy()
env["TZ"] = "UTC"

# Get published (oldest)
cmd_pub = ["git", "log", "--reverse", "--date=iso-strict-local", "--format=%ad", "--", path]
output_pub = subprocess.check_output(cmd_pub, env=env).decode("utf-8").strip()
if not output_pub:
return None, None
published = output_pub.splitlines()[0]

# Get updated (newest, excluding automated commits)
cmd_upd = [
"git", "log", "-1", "--date=iso-strict-local", "--format=%ad",
"--invert-grep", f"--grep={ignore_regex}", "--extended-regexp",
"--", path
]
output_upd = subprocess.check_output(cmd_upd, env=env).decode("utf-8").strip()

# If no "real" update found, use published date
updated = output_upd if output_upd else published

return published, updated
except Exception as e:
print(f"Error getting dates for {path}: {e}")
return None, None

class IndentDumper(yaml.SafeDumper):
def increase_indent(self, flow=False, indentless=False):
return super(IndentDumper, self).increase_indent(flow, False)

def update_manifest(manifest_path):
# Get the directory of the app
app_dir = os.path.dirname(manifest_path)

published, updated = get_git_dates(app_dir)
if not published:
print(f"Skipping {manifest_path} (no git history)")
return

# Check if we need to update
with open(manifest_path, 'r') as f:
try:
data = yaml.safe_load(f)
except Exception as e:
print(f"Error parsing YAML in {manifest_path}: {e}")
return

if data is None:
data = {}

changed = False
# Only set published if it's missing. This preserves historical dates
# even when running in a shallow clone.
if not data.get('published'):
data['published'] = published
changed = True

# Always update the 'updated' date to the latest commit
if data.get('updated') != updated:
data['updated'] = updated
changed = True

if data.get('tags') is None:
data['tags'] = []

if changed:
print(f"Updating {manifest_path}: published={published}, updated={updated}")
with open(manifest_path, 'w', encoding='utf-8') as f:
yaml.dump(data, f, Dumper=IndentDumper, sort_keys=False, default_flow_style=False, explicit_start=True, allow_unicode=True, width=1000, indent=2)


def main():
if len(sys.argv) > 1:
# Use provided arguments (files or directories)
manifests = []
for arg in sys.argv[1:]:
if arg.endswith("manifest.yaml"):
manifests.append(arg)
elif os.path.isdir(arg):
m = os.path.join(arg, "manifest.yaml")
if os.path.exists(m):
manifests.append(m)
else:
# Scan all apps
manifests = glob.glob("apps/*/manifest.yaml")

print(f"Checking {len(manifests)} manifests.")
for m in manifests:
update_manifest(m)

if __name__ == "__main__":
main()
60 changes: 60 additions & 0 deletions .github/workflows/update-metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Update App Metadata

on:
push:
branches:
- main
paths:
- 'apps/**'
workflow_dispatch:

permissions:
contents: write

jobs:
update-metadata:
runs-on: ubuntu-latest
if: github.repository_owner == 'tronbyt' # Avoid running on forks by default
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # Full history needed for git log analysis

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install dependencies
run: pip install PyYAML

- name: Update manifest metadata
id: update
run: |
# Determine modified apps
if [[ "${{ github.event_before }}" == "0000000000000000000000000000000000000000" ]]; then
echo "Initial push or new branch, checking all apps..."
python3 .github/scripts/update_manifests.py
else
echo "Performing incremental update for push..."
TARGETS=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep '^apps/' | cut -d'/' -f1-2 | sort -u || true)
if [ -n "$TARGETS" ]; then
python3 .github/scripts/update_manifests.py $TARGETS
else
echo "No apps modified in this push."
fi
fi

- name: Commit and push changes
run: |
if [[ -n $(git status --porcelain) ]]; then
echo "Detected changes in app manifests. Committing updates..."
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add apps/*/manifest.yaml
git commit -m "chore: auto-update manifest metadata [skip ci]"
git push
else
echo "No metadata updates required."
fi
2 changes: 2 additions & 0 deletions apps/3cellularautomata/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ tags:
- gaming
- retro
- wide 2x support
published: '2023-03-23T12:36:07Z'
updated: '2025-12-23T12:55:56Z'
2 changes: 2 additions & 0 deletions apps/GitHubContributions/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ tags:
- productivity
- dev-tools
- wide 2x support
published: '2026-01-10T08:59:05Z'
updated: '2026-05-01T01:08:29Z'
2 changes: 2 additions & 0 deletions apps/M365Status/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ category: utilities
tags:
- utility
- admin
published: '2026-01-23T22:34:33Z'
updated: '2026-01-23T22:34:33Z'
2 changes: 2 additions & 0 deletions apps/OctoWatts/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- utility
- smart-home
- tech
published: '2024-10-23T14:05:48Z'
updated: '2025-12-28T23:11:23Z'
2 changes: 2 additions & 0 deletions apps/aadailyreflect/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: lifestyle
tags:
- lifestyle
- daily-reflection
published: '2022-11-18T22:27:20Z'
updated: '2025-12-02T19:30:22Z'
3 changes: 3 additions & 0 deletions apps/abcnews/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ name: ABC News
summary: Displays ABC News Headlines
desc: Displays headlines from ABC News Australia. Select the topic from the dropdown and it will display the last 5 headlines.
author: M0ntyP
published: '2026-05-05T16:01:26Z'
updated: '2026-05-05T16:01:26Z'
tags: []
2 changes: 2 additions & 0 deletions apps/abcradio/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- music
- real-time
- local
published: '2024-02-01T22:50:22Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/abstractclock/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- time
- digital-clock
- art
published: '2022-04-04T15:46:29Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/accidentfreedays/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- lifestyle
- utility
- tracking
published: '2023-08-12T12:20:03Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/accuweather/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: weather
tags:
- weather
- local
published: '2023-10-16T21:35:00Z'
updated: '2025-12-02T19:30:22Z'
2 changes: 2 additions & 0 deletions apps/acfilmshowtimes/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: entertainment
tags:
- media
- theaters
published: '2023-03-14T18:48:18Z'
updated: '2026-05-01T16:28:33Z'
2 changes: 2 additions & 0 deletions apps/acidwarp/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ category: entertainment
tags:
- retro
- art
published: '2025-02-03T23:05:56Z'
updated: '2025-12-02T19:30:22Z'
2 changes: 2 additions & 0 deletions apps/acnhvillager/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ recommendedInterval: 5
category: entertainment
tags:
- gaming
published: '2023-02-21T18:22:33Z'
updated: '2025-12-02T19:30:22Z'
2 changes: 2 additions & 0 deletions apps/actransit/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ recommendedInterval: 5
category: transit
tags:
- real-time
published: '2023-03-02T17:17:36Z'
updated: '2025-12-23T13:24:18Z'
2 changes: 2 additions & 0 deletions apps/adafruitio/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ tags:
- tech
- smart-home
- utility
published: '2023-11-01T18:27:25Z'
updated: '2025-11-30T19:58:27Z'
4 changes: 3 additions & 1 deletion apps/adelaidemetro/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@ fileName: adelaide_metro.star
packageName: adelaidemetro
recommendedInterval: 5
category: transit
tags:
tags: []
published: '2023-02-03T20:58:19Z'
updated: '2025-12-02T19:30:22Z'
2 changes: 2 additions & 0 deletions apps/advice/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: entertainment
tags:
- motivational
- media
published: '2022-09-15T19:22:14Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/afl/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: sports
tags:
- afl
- football
published: '2022-06-09T16:52:13Z'
updated: '2025-11-30T20:08:55Z'
2 changes: 2 additions & 0 deletions apps/aflladder/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- real-time
- afl
- football
published: '2023-03-23T12:25:31Z'
updated: '2026-01-14T23:37:56Z'
2 changes: 2 additions & 0 deletions apps/aflscores/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: sports
tags:
- afl
- football
published: '2023-03-23T12:24:44Z'
updated: '2026-04-21T20:43:23Z'
2 changes: 2 additions & 0 deletions apps/airbnbcalendar/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tags:
- finance
- utility
- productivity
published: '2023-03-14T19:16:32Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/airnow/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tags:
- weather
- utility
- wide 2x support
published: '2023-06-15T20:34:58Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/airquality/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: utilities
tags:
- weather
- utility
published: '2023-04-27T13:40:02Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/airthings/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- nature
- smart-home
- tech
published: '2023-01-03T16:46:43Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/amazing/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- gaming
- art
- retro
published: '2022-09-22T16:34:31Z'
updated: '2025-11-29T17:52:33Z'
2 changes: 2 additions & 0 deletions apps/ambientweather/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- weather
- art
- smart-home
published: '2022-05-02T16:59:50Z'
updated: '2025-12-05T22:28:51Z'
2 changes: 2 additions & 0 deletions apps/americanmapbook/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ tags:
- utility
- science
- wide 2x support
published: '2025-06-24T22:52:36Z'
updated: '2025-11-29T17:52:33Z'
2 changes: 2 additions & 0 deletions apps/amtrakstation/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ supports2x: true
category: transit
tags:
- utility
published: '2026-04-17T17:15:09Z'
updated: '2026-04-19T02:21:59Z'
2 changes: 2 additions & 0 deletions apps/analogclock/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ tags:
- analog
- art
- utility
published: '2022-02-04T18:24:43Z'
updated: '2025-12-02T19:30:22Z'
2 changes: 2 additions & 0 deletions apps/analogtime/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- art
- analog
- time
published: '2022-02-15T20:18:11Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/anime_next_ep/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ category: entertainment
tags:
- media
- anime
published: '2025-03-04T16:51:58Z'
updated: '2025-11-29T17:52:33Z'
2 changes: 2 additions & 0 deletions apps/anycalendar/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ category: utilities
tags:
- productivity
- utility
published: '2025-04-04T01:49:24Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/anyprogressbar/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tags:
- tracking
- art
- tech
published: '2023-01-12T16:59:31Z'
updated: '2025-11-30T19:58:27Z'
2 changes: 2 additions & 0 deletions apps/apiimage/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ tags:
- utility
- art
- customization
published: '2024-09-26T16:10:17Z'
updated: '2025-12-28T23:11:23Z'
2 changes: 2 additions & 0 deletions apps/apitext/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- tech
- art
- utility
published: '2024-10-09T16:50:19Z'
updated: '2025-12-28T23:11:23Z'
2 changes: 2 additions & 0 deletions apps/aquarium/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ tags:
- nature
- art
- wide 2x support
published: '2024-11-05T17:51:57Z'
updated: '2026-02-04T00:13:36Z'
Loading
Loading