fixed broken external links, imported some Hg repositories of inactive projects to Git

This commit is contained in:
Trilarion
2019-07-15 13:33:08 +02:00
parent 1672312a0b
commit e673aa8317
51 changed files with 163 additions and 143 deletions

View File

@ -311,7 +311,6 @@
"https://github.com/simhacker/micropolis.git",
"https://github.com/singularity/singularity.git",
"https://github.com/snauts/game-lv.git",
"https://github.com/solarus-games/solarus.git",
"https://github.com/spring/spring.git",
"https://github.com/stepmania/stepmania.git",
"https://github.com/stuntrally/stuntrally.git",
@ -367,13 +366,17 @@
"https://gitlab.com/osgames/blacknova.git",
"https://gitlab.com/osgames/blitzkrieg.git",
"https://gitlab.com/osgames/blobwars.git",
"https://gitlab.com/osgames/blockout.git",
"https://gitlab.com/osgames/bmtactics.git",
"https://gitlab.com/osgames/boson.git",
"https://gitlab.com/osgames/brain-workshop.git",
"https://gitlab.com/osgames/btanks.git",
"https://gitlab.com/osgames/celestron.git",
"https://gitlab.com/osgames/civil.git",
"https://gitlab.com/osgames/civilwar.git",
"https://gitlab.com/osgames/coltoo.git",
"https://gitlab.com/osgames/conquests.git",
"https://gitlab.com/osgames/corewar.git",
"https://gitlab.com/osgames/crimson.git",
"https://gitlab.com/osgames/crownandcutlass.git",
"https://gitlab.com/osgames/dark-oberon.git",
@ -395,9 +398,11 @@
"https://gitlab.com/osgames/freetrain.git",
"https://gitlab.com/osgames/fujo.git",
"https://gitlab.com/osgames/galaxyng.git",
"https://gitlab.com/osgames/gav.git",
"https://gitlab.com/osgames/glest.git",
"https://gitlab.com/osgames/gm-tools.git",
"https://gitlab.com/osgames/goblin-camp.git",
"https://gitlab.com/osgames/grobots.git",
"https://gitlab.com/osgames/gwiz.git",
"https://gitlab.com/osgames/h-world.git",
"https://gitlab.com/osgames/howc.git",
@ -417,28 +422,41 @@
"https://gitlab.com/osgames/metalmech.git",
"https://gitlab.com/osgames/monstrosity.git",
"https://gitlab.com/osgames/murderpd.git",
"https://gitlab.com/osgames/nxtank.git",
"https://gitlab.com/osgames/openblox.git",
"https://gitlab.com/osgames/openrpg.git",
"https://gitlab.com/osgames/openrpgmaker.git",
"https://gitlab.com/osgames/openyahtzee.git",
"https://gitlab.com/osgames/orient.git",
"https://gitlab.com/osgames/pangzero.git",
"https://gitlab.com/osgames/parpg-core.git",
"https://gitlab.com/osgames/phantasy.git",
"https://gitlab.com/osgames/phaosrpg.git",
"https://gitlab.com/osgames/pizza-business.git",
"https://gitlab.com/osgames/planets.git",
"https://gitlab.com/osgames/pykaraoke.git",
"https://gitlab.com/osgames/pymapper.git",
"https://gitlab.com/osgames/radakan.git",
"https://gitlab.com/osgames/rogueclone.git",
"https://gitlab.com/osgames/rpdungeon.git",
"https://gitlab.com/osgames/rpge.git",
"https://gitlab.com/osgames/sge2d.git",
"https://gitlab.com/osgames/sharpkonquest.git",
"https://gitlab.com/osgames/skrupel.git",
"https://gitlab.com/osgames/slaygame.git",
"https://gitlab.com/osgames/snowstorm.git",
"https://gitlab.com/osgames/spaceopera.git",
"https://gitlab.com/osgames/spicetrade.git",
"https://gitlab.com/osgames/sumwars.git",
"https://gitlab.com/osgames/tbots.git",
"https://gitlab.com/osgames/the-bubs-brothers.git",
"https://gitlab.com/osgames/theclans.git",
"https://gitlab.com/osgames/torcs.git",
"https://gitlab.com/osgames/tuxfootball.git",
"https://gitlab.com/osgames/tuxracer.git",
"https://gitlab.com/osgames/uaf.git",
"https://gitlab.com/osgames/umbra.git",
"https://gitlab.com/osgames/uqm.git",
"https://gitlab.com/osgames/ura-game.git",
"https://gitlab.com/osgames/uwadv.git",
"https://gitlab.com/osgames/wargamer.git",
@ -452,6 +470,7 @@
"https://gitlab.com/osgames/zeroballistics.git",
"https://gitlab.com/osslugaru/lugaru.git",
"https://gitlab.com/pingus/pingus.git",
"https://gitlab.com/solarus-games/solarus.git",
"https://gitlab.com/solarus-games/zsdx.git",
"https://gitlab.com/veloren/veloren.git",
"https://gitlab.com/xonotic/xonotic.git",
@ -466,8 +485,6 @@
"https://svn.code.sf.net/p/atomiks/code/",
"https://svn.code.sf.net/p/blobby/code/",
"https://svn.code.sf.net/p/bombermaaan/code/",
"https://svn.code.sf.net/p/brainworkshop/code/",
"https://svn.code.sf.net/p/btanks/code/",
"https://svn.code.sf.net/p/catmother/code/",
"https://svn.code.sf.net/p/crossfire/code/",
"https://svn.code.sf.net/p/daimonin/code/",
@ -477,7 +494,6 @@
"https://svn.code.sf.net/p/freesynd/code/",
"https://svn.code.sf.net/p/fsc/code/",
"https://svn.code.sf.net/p/lgames/code/",
"https://svn.code.sf.net/p/nxtank/code/",
"https://svn.code.sf.net/p/opencity/code/",
"https://svn.code.sf.net/p/openpopulous/code/",
"https://svn.code.sf.net/p/opensnc/code/",

View File

@ -131,12 +131,16 @@ def check_validity_external_links():
print("check external links (can take a while)")
# regex for finding urls (can be in <> or in () or a whitespace
regex = re.compile(r"[\s\n]<(http.+?)>|\]\((http.+?)\)|[\s\n](http[^\s\n,]+)")
# regex for finding urls (can be in <> or in ]() or after a whitespace
#regex = re.compile(r"[\s\n]<(http.+?)>|\]\((http.+?)\)|[\s\n](http[^\s\n,]+?)[\s\n\)]")
regex = re.compile(r"[\s\n<(](http://.*?)[\s\n>)]")
# count
number_checked_links = 0
# ignore the following urls (they give false positives here)
ignored_urls = ('https://git.tukaani.org/xz.git')
# iterate over all entries
for _, entry_path, content in entry_iterator():
@ -150,7 +154,7 @@ def check_validity_external_links():
for url in match:
# if there was something (and not a sourceforge git url)
if url and not url.startswith('https://git.code.sf.net/p/'):
if url and not url.startswith('https://git.code.sf.net/p/') and url not in ignored_urls:
try:
# without a special header, frequent 403 responses occur
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64)'})