This commit is contained in:
Morgan 2023-10-12 12:56:37 +09:00
commit b4689b0b44
4 changed files with 43 additions and 9 deletions

14
README.md Normal file
View File

@ -0,0 +1,14 @@
## PAWE.ME
Simple mirroring & archiving server.
- This script is used to serve [pawe.me](https://pawe.me) mirroring server.
- config.yaml contains various config options, can add more repo/upstream with just adding to config. supports http, rsync, ftpsync(debian).
- ~~HTTP Mirroring uses custom python script using aiohttp, may change to wget recursive mirroring..~~ fixing script, currently just fetches in order.
- $BASE_DIR is where all data is stored. Need to change manually in script index.py
- index.py renders index.html file after each sync, order and half-size card can be configured in config.yml
- element DIVIDER in .index (from config) is used to divide card between "main" and "additional mirroring" in index.html

View File

@ -58,7 +58,7 @@
formData.append('title', title);
formData.append('content', content);
fetch(PUSHNOTIFICAATIONURL, {
fetch(PUSHAPIADDRESS, {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',

View File

@ -35,32 +35,40 @@ defaults:
repos:
ARCHLINUX:
url: rsync://mirrors.xtom.de/archlinux/
duration: 4
delay: 4
name: "ArchLinux (x86_64)"
path: archlinux
UBUNTU:
url: rsync://rsync.archive.ubuntu.com/ubuntu/
duration: 4
delay: 4
name: "Ubuntu"
path: ubuntu
UBUNTU_CD:
url: rsync://releases.ubuntu.com/releases/
<<<<<<< HEAD
duration: 12
=======
delay: 24
>>>>>>> refs/remotes/origin/main
name: "Ubuntu Releases"
path: ubuntu_cd
UBUNTU_CD_OLD:
url: rsync://old-releases.ubuntu.com/releases/
<<<<<<< HEAD
duration: 12
=======
delay: 24
>>>>>>> refs/remotes/origin/main
name: "Ubuntu Releases (Old)"
path: ubuntu_cd_old
DEBIAN:
url: rsync://mirrors.xtom.jp/debian/
type: ftpsync
duration: 4
delay: 4
name: Debian
path: debian
scripts:
@ -69,25 +77,29 @@ repos:
DEBIAN_CD:
url: rsync://ftp.lanet.kr/debian-cd/
<<<<<<< HEAD
duration: 12
=======
delay: 24
>>>>>>> refs/remotes/origin/main
name: "Debian CD"
path: debian_cd
FEDORA:
url: rsync://dl.fedoraproject.org/fedora-enchilada/linux/
duration: 4
delay: 4
name: "Fedora"
path: fedora
RASPBIAN:
url: rsync://archive.raspbian.org/archive/
duration: 6
delay: 6
name: "Raspbian"
path: raspbian
MANJARO:
url: rsync://ftp.riken.jp/manjaro/
duration: 4
delay: 4
name: Manjaro
path: manjaro
@ -96,15 +108,25 @@ repos:
path: archlinuxarm
url: http://jp.mirror.archlinuxarm.org/
type: http
<<<<<<< HEAD
duration: 12
=======
delay: 12
last_sync: "2023-10-09T23:30Z"
>>>>>>> refs/remotes/origin/main
ASAHILINUX:
name: "AsahiLinux"
path: asahilinux
url: https://cdn.asahilinux.org/
type: http
<<<<<<< HEAD
duration: 12
=======
delay: 12
last_sync: "2023-10-09T23:30Z"
>>>>>>> refs/remotes/origin/main
index:
- ARCHLINUX
- UBUNTU UBUNTU_CD

View File

@ -53,8 +53,6 @@ if __name__ == "__main__":
print("Usage: createFetch.py [URL] [Path] (fetch)")
sys.exit()
# urls = {"archlinuxarm": "http://jp.mirror.archlinuxarm.org/", "asahilinux": "https://cdn.asahilinux.org/", "linux-surface": "https://pkg.surfacelinux.com/arch/"}
if "http" in sys.argv[1]:
if input(f"[*] Download from {sys.argv[1]}? ") in "Yy":
url = sys.argv[1]