|
|
|
@ -7,34 +7,9 @@ This mirror status checker determines whether CSC mirror is up-to-date with upst |
|
|
|
|
import time |
|
|
|
|
import sys |
|
|
|
|
import requests |
|
|
|
|
from projects.almalinux import AlmaLinux |
|
|
|
|
from projects.alpine import Alpine |
|
|
|
|
from projects.apache import Apache |
|
|
|
|
from projects.arch import Arch |
|
|
|
|
from projects.centos import CentOS |
|
|
|
|
from projects.ceph import Ceph |
|
|
|
|
from projects.cpan import CPAN |
|
|
|
|
from projects.cygwin import Cygwin |
|
|
|
|
from projects.debian import Debian |
|
|
|
|
from projects.debiancd import DebianCD |
|
|
|
|
from projects.debianmultimedia import DebianMultimedia |
|
|
|
|
from projects.debianports import DebianPorts |
|
|
|
|
from projects.debiansecurity import DebianSecurity |
|
|
|
|
from projects.eclipse import Eclipse |
|
|
|
|
from projects.fedora import Fedora |
|
|
|
|
from projects.freebsd import FreeBSD |
|
|
|
|
from projects.gentoodistfiles import GentooDistfiles |
|
|
|
|
from projects.gentooportage import GentooPortage |
|
|
|
|
from projects.gnome import GNOME |
|
|
|
|
from projects.gnu import GNU |
|
|
|
|
from projects.gutenberg import Gutenberg |
|
|
|
|
from projects.ipfire import IPFire |
|
|
|
|
from projects.kde import KDE |
|
|
|
|
from projects.kdeapplicationdata import KDEApplicationData |
|
|
|
|
from projects.kernel import Kernel |
|
|
|
|
from projects.openbsd import OpenBSD |
|
|
|
|
from shared import CSC_MIRROR |
|
|
|
|
from dateparser.search import search_dates # this library seems to be super slow but the other library: dateutil.parser gets some errors |
|
|
|
|
|
|
|
|
|
from projects import * # noqa |
|
|
|
|
# from dateparser.search import search_dates # this library seems to be super slow but the other library: dateutil.parser gets some errors |
|
|
|
|
# http://theautomatic.net/2018/12/18/2-packages-for-extracting-dates-from-a-string-of-text-in-python/ |
|
|
|
|
import re # import regular expressions to remove stray numbers in string that might interfere with date finding |
|
|
|
|
import json # import json to read project info stored in json file |
|
|
|
@ -111,4 +86,4 @@ if __name__ == "__main__": |
|
|
|
|
except requests.exceptions.RequestException as err: |
|
|
|
|
print(f"Error: {project}\n{err}") |
|
|
|
|
with open("data.json", "w", encoding="utf-8") as file: |
|
|
|
|
json.dump(data, file, indent=4) |
|
|
|
|
json.dump(data, file, indent='\t') |
|
|
|
|