Skip to content

Conversation

@idlip
Copy link
Collaborator

@idlip idlip commented Oct 22, 2025

  • For Unexpected failures with logo/image #13

  • Added an python script to sync all image data with local files via hash verification

  • Converted all json image field to map on /images/.img

  • Downloaded about 93 images = 5 MB

  • Python script has --help to handle some function

usage:

uv run python3 image-sync.py Username.json
checks if hash match and file name exists

uv run python3 image-sync.py --verify-cache
verify all image links if any has been updated

uv run python3 image-sync.py
run sync on all maintainer/*.json file (< 1 minute run)

@idlip idlip requested a review from rahulporuri October 22, 2025 11:02
@idlip
Copy link
Collaborator Author

idlip commented Oct 22, 2025

The method i thought was to have a .image-cache.json file which holds URL link, hash and file name mapped

Python does 3 steps:

  • Check if its an url, then download and rename it to images dir as photo or <project_name> with appr extension
  • If file exists, simply skips or check for hash mismatch if any

Most of the script code is useless after this.
We only care for proper sync if any image file has been updated from user side (outside) against our local repo file

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.

1 participant