2
1
Fork
You've already forked forklore
0

migrate all image data to local repo #145

Closed
idlip wants to merge 6 commits from idlip/migrate-image into develop
pull from: idlip/migrate-image
merge into: FOSSUnited:develop
FOSSUnited:develop
FOSSUnited:revert-68-develop
idlip commented 2025年10月22日 13:01:47 +02:00 (Migrated from github.com)
Copy link
  • For #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)

- For #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/<filename>.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)
rahulporuri (Migrated from github.com) reviewed 2025年10月22日 13:01:47 +02:00
idlip commented 2025年10月22日 13:05:25 +02:00 (Migrated from github.com)
Copy link

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

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 <username>_photo or <username>_<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
idlip closed this pull request 2026年05月08日 13:18:30 +02:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
FOSSUnited/forklore!145
Reference in a new issue
FOSSUnited/forklore
No description provided.
Delete branch "idlip/migrate-image"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?