{"id":22437230,"url":"https://github.com/ustclug/mirrors-index","last_synced_at":"2025-04-13T18:06:53.542Z","repository":{"id":80080541,"uuid":"48351386","full_name":"ustclug/mirrors-index","owner":"ustclug","description":"Mirrored infrequently. Go https://git.lug.ustc.edu.cn/mirrors/mirrors-index for latest version","archived":false,"fork":false,"pushed_at":"2025-02-08T16:32:07.000Z","size":2616,"stargazers_count":11,"open_issues_count":1,"forks_count":7,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-08T17:29:22.371Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://mirrors.ustc.edu.cn","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ustclug.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-21T04:52:54.000Z","updated_at":"2025-02-08T16:32:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"68f0e57a-e8b7-4e11-b9d8-11ca864dd982","html_url":"https://github.com/ustclug/mirrors-index","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustclug%2Fmirrors-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustclug%2Fmirrors-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustclug%2Fmirrors-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ustclug%2Fmirrors-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ustclug","download_url":"https://codeload.github.com/ustclug/mirrors-index/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245813225,"owners_count":20676763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-06T00:12:12.658Z","updated_at":"2025-03-27T08:44:08.043Z","avatar_url":"https://github.com/ustclug.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mirrors-index\n\nHelp documentation source code: https://github.com/ustclug/mirrorhelp/\n\n## Dependencies\n\n* python3\n* python3-requests\n* python3-jinja2\n* systemd (optional)\n\n## Install\n\ngenisolist is a submodule of mirrorz-genisolist, so please checkout the submodule first:\n\n```shell\ngit submodule update --init --recursive\n```\n\nAssuming that your metadata is stored in `/srv/rsync-attrs`. Otherwise, you should modify the `HTTPDIR` variable in gencontent.py (by gencontent.json), and root attribute in genisolist.ini.\n\nMetadata now is generated from rsync-huai hook after every sync by yuki.\n\n### Current Method\n\nAdd the following line to your crontab (`crontab -e`)\n\n```\n10  *   * * *   /usr/bin/python3 /home/mirror/scripts/mirrors-index/genindex.py -o /srv/www-misc/index.html 2\u003e /dev/null\n```\n\nIt will update every hour at minute 10.\n\n### Alternative Method\n\nCopy all the systemd service files (`mirrors-index.service`, `mirrors-index.timer`,\n`mirrors-index.path`) from `services/` dir into `/etc/systemd/system/`.\nThen enable them and start the timer and the path file.\n\n### Previous Method\n\nThe following method is obsolete, because /srv/www only contains symlinks.\n\nAdd a following line to incrontab:\n\n```/srv/www IN_CREATE,IN_DELETE,IN_MOVE /home/mirror/newindex/genindex.py```\n\nThe crontab file was also used to trigger the update based on time before.\nUse `crontab -l -u mirror` to check the line that has been commented out for now.\n\n### Locales\n\nInstall zh_CN locales since the `genisolist.ini` file contains Chinese characters.\n\n## Development\n\nHere we introduce how to develop this project on your personal computer (without polluting host's filesystem environment).\n\nCreate a Debian container:\n\n```shell\n# fish shell\ndocker run --rm -it -p 8000:8000 -e TZ=Asia/Shanghai -v $(pwd):/workspace ustclug/debian:12\n# bash shell\ndocker run --rm -it -p 8000:8000 -e TZ=Asia/Shanghai -v $PWD:/workspace ustclug/debian:12\n```\n\nThen `apt update \u0026\u0026 apt install -y python3 python3-requests python3-jinja2 rsync` to install dependencies.\n\n`mkdir /srv/rsync-attrs` to create a fake directory for metadata, and `python3 -m http.server --directory /srv/rsync-attrs \u0026` at `/workspace` to start a HTTP server at port 8000 for host browser access.\n\n`python3 genindex.py` to generate the index page. Note that this repo currently does not contain webfont-related files yet.\n\nIf you need to debug genisolist, use `z-genisolist/utils/rsync-stub-generator.py` to generate stub files for testing. Example:\n\n```shell\nz-genisolist/utils/rsync-stub-generator.py rsync://rsync.mirrors.ustc.edu.cn/archlinux --dist /srv/rsync-attrs/archlinux\n```\n\nAlso `DEBUG_WITH_REPOLIST=1 python3 genindex.py` can help create folders within `HTTPDIR`/`OUTDIR` without the necessity to create stub files one by one.\n\n## Copyright\n\n    Copyright © 2013-2024 USTC Linux User Group \u003clug@ustc.edu.cn\u003e\n    All rights reserved.\n\n    This file is part of Mirrors-index.\n\n    Mirrors-index is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License version 2 as\n    published by the Free Software Foundation.\n\n    Mirrors-index is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\n    You should have received a copy of the GNU General Public License\n    along with Mirrors-index.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\n* * *\nLUG@USTC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fustclug%2Fmirrors-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fustclug%2Fmirrors-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fustclug%2Fmirrors-index/lists"}