archive update (with location specified in local-config.ini) and small updates of links

This commit is contained in:
Trilarion 2020-08-26 19:31:09 +02:00
parent 03a7680429
commit 0d208dbdf7
16 changed files with 56 additions and 28 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
/.idea
__pycache__
/local.properties
/local-config.ini
/code/archive/**
/code/lgw-import

View File

@ -11,21 +11,28 @@ TODO are really all existing branches cloned and pulled? (see https://stackoverf
TODO Sourceforge git clone may not work all the time (restarting the script sometimes helps..)
Note: May need to set http.postBuffer (https://stackoverflow.com/questions/17683295/git-bash-error-rpc-failed-result-18-htp-code-200b-1kib-s)
For repositories
see https://serverfault.com/questions/544156/git-clone-fail-instead-of-prompting-for-credentials
"""
import json
from utils.utils import *
from utils.archive import *
import utils.constants as c
def git_clone(url, folder):
# subprocess_run(["git", "clone", "--mirror", url, folder], shell=True, env={'GIT_TERMINAL_PROMPT': '0'})
subprocess_run(["git", "clone", "--mirror", url, folder])
def git_update(folder):
os.chdir(folder)
subprocess_run(["git", "fetch", "--all"])
# subprocess_run(["git", "fetch", "--all"], shell=True, env={'GIT_TERMINAL_PROMPT': '0'})
subprocess_run(["git", "fetch", "--all"], display=False)
def svn_folder_name(url):
@ -69,6 +76,9 @@ def run_update(type, urls, type_folder=None):
base_folder = os.path.join(archive_folder, type_folder)
if not os.path.exists(base_folder):
os.mkdir(base_folder)
unused_base_folder = os.path.join(archive_folder, type_folder + '.unused')
if not os.path.exists(unused_base_folder):
os.mkdir(unused_base_folder)
# get derived folder names
folders = [folder_name[type](url) for url in urls]
@ -76,9 +86,12 @@ def run_update(type, urls, type_folder=None):
# find those folders not used anymore
existing_folders = [x for x in os.listdir(base_folder) if os.path.isdir(os.path.join(base_folder, x))]
unused_folders = [x for x in existing_folders if x not in folders]
print('{} unused archives'.format(len(unused_folders)))
if unused_folders:
print(unused_folders)
print('{} unused archives, move to unused folder'.format(len(unused_folders)))
for folder in unused_folders:
origin = os.path.join(base_folder, folder)
destination = os.path.join(unused_base_folder, folder)
if not os.path.exists(destination):
shutil.move(origin, destination)
# new folder, need to clone
new_folders = [x for x in folders if x not in existing_folders]
@ -101,7 +114,7 @@ def run_update(type, urls, type_folder=None):
if not os.path.isdir(folder):
print('folder not existing, wanted to update, will skip')
continue
print('update {}'.format(folder[len(base_folder):]))
# print('update {}'.format(folder[len(base_folder):]))
try:
update[type](folder)
except RuntimeError as e:
@ -148,7 +161,9 @@ if __name__ == '__main__':
# get this folder
root_folder = os.path.realpath(os.path.dirname(__file__))
archive_folder = os.path.join(root_folder, 'archive')
archive_folder = c.get_config('archive-folder')
if not archive_folder:
raise RuntimeError('No archive folder specified.')
# read archives.json
text = read_text(os.path.join(root_folder, 'archives.json'))

View File

@ -295,6 +295,7 @@
"https://github.com/ObKo/OpenSR.git",
"https://github.com/OneSleepyDev/boswars_osd.git",
"https://github.com/OneSleepyDev/boswars_osd_archive.git",
"https://github.com/OnlineCop/kqlives.git",
"https://github.com/OoliteProject/oolite.git",
"https://github.com/OpMonTeam/OpMon-Data.git",
"https://github.com/OpMonTeam/OpMon.git",
@ -641,7 +642,6 @@
"https://github.com/gregoryfenton/other-life.git",
"https://github.com/griefly/griefly.git",
"https://github.com/grit-engine/grit-engine.git",
"https://github.com/grrk-bzzt/kqlives.git",
"https://github.com/gtheilman/RxWars.git",
"https://github.com/guillaume-gouchon/dungeonhero.git",
"https://github.com/guillaume-gouchon/dungeonquest.git",
@ -792,6 +792,7 @@
"https://github.com/nenadalm/Train.git",
"https://github.com/nevat/abbayedesmorts-gpl.git",
"https://github.com/nhydock/UlDunAd.git",
"https://github.com/nicholas-ochoa/OpenSC2K.git",
"https://github.com/nicupavel/openpanzer.git",
"https://github.com/nigels-com/glew.git",
"https://github.com/nikki-and-the-robots/nikki.git",
@ -880,7 +881,6 @@
"https://github.com/radu124/splexhd.git",
"https://github.com/raduprv/Eternal-Lands.git",
"https://github.com/rafaelcastrocouto/enduro.git",
"https://github.com/rage8885/OpenSC2K.git",
"https://github.com/rayjohannessen/songofalbion.git",
"https://github.com/raysan5/raylib.git",
"https://github.com/raysan5/rfxgen.git",
@ -1385,7 +1385,6 @@
"svn://svn.zoy.org/abuse/abuse/trunk"
],
"hg": [
"http://hg.assembla.com/parpg-core",
"http://hg.code.sf.net/p/blood/code",
"http://hg.code.sf.net/p/directpython11/code",
"http://hg.code.sf.net/p/fltrator/code",

View File

@ -3,6 +3,7 @@ Paths, properties.
"""
import os
import configparser
# paths
root_path = os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir))
@ -10,4 +11,16 @@ entries_path = os.path.join(root_path, 'entries')
tocs_path = os.path.join(entries_path, 'tocs')
code_path = os.path.join(root_path, 'code')
local_properties_file = os.path.join(root_path, 'local.properties')
local_config_file = os.path.join(root_path, 'local-config.ini')
config = configparser.ConfigParser()
config.read(local_config_file)
def get_config(key):
"""
:param key:
:return:
"""
return config['general'][key]

View File

@ -146,12 +146,12 @@ def determine_latest_last_modified_date(folder):
return latest_last_modified
def subprocess_run(cmd, display=True):
def subprocess_run(cmd, display=True, shell=False, env={}):
"""
Runs a cmd via subprocess and displays the std output in case of success or the std error output in case of failure
where it also stops execution.
"""
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result = subprocess.run(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=shell, env=dict(os.environ, **env))
if result.returncode:
if display:
print("error {} in call {}".format(result.returncode, cmd))

View File

@ -4966,7 +4966,7 @@
"<a href=\"https://sourceforge.net/projects/kqlives/files/\">Link</a>",
"beta / inactive since 2011",
"role playing",
"<a href=\"https://github.com/grrk-bzzt/kqlives.git\">Source</a> - C - GPL-2.0"
"<a href=\"https://github.com/OnlineCop/kqlives.git\">Source</a> - C - GPL-2.0"
],
[
"Krank (<a href=\"http://krank.sourceforge.net/\">home</a>, <a href=\"https://github.com/Trilarion/opensourcegames/blob/master/entries/krank.md\">entry</a>)",
@ -7025,12 +7025,12 @@
"<a href=\"https://github.com/OpenSAGE/OpenSAGE.git\">Source</a> - C# - LGPL-3.0"
],
[
"OpenSC2K (<a href=\"https://github.com/rage8885/OpenSC2K\">home</a>, <a href=\"https://github.com/Trilarion/opensourcegames/blob/master/entries/opensc2k.md\">entry</a>)",
"OpenSC2K (<a href=\"https://github.com/nicholas-ochoa/OpenSC2K\">home</a>, <a href=\"https://github.com/Trilarion/opensourcegames/blob/master/entries/opensc2k.md\">entry</a>)",
"Remake of SimCity 2000.",
"",
"beta / active",
"simulation, inspired by SimCity 2000, remake",
"<a href=\"https://github.com/rage8885/OpenSC2K.git\">Source</a> - JavaScript - GPL-3.0"
"<a href=\"https://github.com/nicholas-ochoa/OpenSC2K.git\">Source</a> - JavaScript - GPL-3.0"
],
[
"OpenSkyscraper (<a href=\"http://openskyscraper.org/\">home</a>, <a href=\"https://github.com/Trilarion/opensourcegames/blob/master/entries/openskyscraper.md\">entry</a>)",
@ -7398,7 +7398,7 @@
"<a href=\"http://blog.parpg.net/download/\">Link</a>",
"beta / inactive since 2012",
"role playing, inspired by Fallout 2, remake",
"<a href=\"http://hg.assembla.com/parpg-core\">Source</a> - Python - GPL-3.0"
"<a href=\"https://gitlab.com/osgames/parpg-core.git\">Source</a> - Python - GPL-3.0"
],
[
"PARSEC47 (<a href=\"http://www.asahi-net.or.jp/~cs8k-cyu/windows/p47_e.html\">home</a>, <a href=\"https://github.com/Trilarion/opensourcegames/blob/master/entries/parsec47.md\">entry</a>)",

View File

@ -7,7 +7,7 @@ _Remake of Doom, Doom II, Heretic, Hexen._
- Download: https://sourceforge.net/projects/deng/files/
- Platform: Windows, Linux, macOS
- Keywords: action, commercial content, inspired by Doom + Doom II + Heretic + Hexen, remake, requires original content
- Code repository: https://github.com/skyjake/Doomsday-Engine.git, https://git.code.sf.net/p/deng/code (+), http://hg.code.sf.net/p/deng/code-0 (hg)
- Code repository: https://github.com/skyjake/Doomsday-Engine.git, https://git.code.sf.net/p/deng/code (+)
- Code language: C, C++
- Code license: GPL-2.0 (see source files), GPL-3.0, LGPL-3.0 (core)

View File

@ -12,5 +12,6 @@ _Remake of Krush, Kill 'n' Destroy._
- Code license: GPL-3.0
- Code dependencies: OpenRA
See also https://github.com/gp-alex/OpenKKND
## Building

View File

@ -6,11 +6,11 @@ _A console-style role playing game._
- State: beta, inactive since 2011
- Download: https://sourceforge.net/projects/kqlives/files/
- Keywords: role playing
- Code repository: https://github.com/grrk-bzzt/kqlives.git (backup), https://svn.code.sf.net/p/kqlives/code (svn)
- Code repository: https://github.com/OnlineCop/kqlives.git (archived), https://svn.code.sf.net/p/kqlives/code (svn)
- Code language: C
- Code license: GPL-2.0
Are [KQtheBetrayer](https://sourceforge.net/projects/kqthebetrayer/) or [this github fork](https://github.com/grrk-bzzt/kq-fork) different enough to
Are [KQtheBetrayer](https://sourceforge.net/projects/kqthebetrayer/) or [this github fork](https://github.com/OnlineCop/kq-fork) different enough to
warrant their own entries?
## Building

View File

@ -5,7 +5,7 @@ _Mod of Team Fortress 2._
- Home: https://openfortress.fun/
- State: beta
- Keywords: remake, commercial content, inspired by Team Fortress 2, modification, multiplayer competitive + online + LAN + co-op + matchmaking
- Code repository: https://github.com/KaidemonLP/Open-Fortress-Source.git
- Code repository: https://github.com/KaidemonLP/Open-Fortress-Source.git, https://svn.openfortress.fun/svn/open_fortress/
- Code language: C++
- Code license: CC-BY-NC-SA-4.0 (https://github.com/KaydemonLP/Open-Fortress-Source/blob/master/LICENSE), Custom (Source 1 SDK license)
- Code dependencies: Source SDK

View File

@ -2,11 +2,11 @@
_Remake of SimCity 2000._
- Home: https://github.com/rage8885/OpenSC2K
- Home: https://github.com/nicholas-ochoa/OpenSC2K
- State: beta
- Platform: Web
- Keywords: simulation, inspired by SimCity 2000, remake
- Code repository: https://github.com/rage8885/OpenSC2K.git
- Code repository: https://github.com/nicholas-ochoa/OpenSC2K.git
- Code language: JavaScript
- Code license: GPL-3.0
- Code dependencies: Phaser, WebGL

View File

@ -6,7 +6,7 @@ _Post-Apocalyptic RPG._
- State: beta, inactive since 2012
- Download: http://blog.parpg.net/download/, http://wiki.parpg.net/Download
- Keywords: role playing, inspired by Fallout 2, remake
- Code repository: http://hg.assembla.com/parpg-core (hg), https://gitlab.com/osgames/parpg-core.git (+), http://subversion.assembla.com/svn/parpg-assets/ (svn), http://parpg-trac.cvsdude.com/parpg/browser (svn)
- Code repository: https://gitlab.com/osgames/parpg-core.git, http://subversion.assembla.com/svn/parpg-assets/ (svn), http://parpg-trac.cvsdude.com/parpg/browser (svn)
- Code language: Python
- Code license: GPL-3.0
- Code dependencies: Blender game engine, FIFE, psyco, pygame, PyQt, PySide

View File

@ -7,7 +7,7 @@ _MMORPG with open world play._
- State: mature
- Play: https://www.ryzom.com/ (commercial)
- Keywords: role playing, inspired by Ryzom, multiplayer massive + online, remake, requires server (?)
- Code repository: https://github.com/ryzom/ryzomcore.git
- Code repository: https://github.com/ryzom/ryzomcore.git, https://gitlab.com/ryzom/ryzom-core.git (mirror)
- Code language: C++
- Code license: AGPL-3.0
- Assets license: CC

View File

@ -11,7 +11,7 @@ _Roguelike game with a 3D user interface._
- Code license: GPL-2.0
- Code dependencies: SDL
See also: https://github.com/q4a/scourge2, https://bitbucket.org/uzudil/scourge2/
See also: https://github.com/q4a/scourge2
## Building

View File

@ -2,7 +2,7 @@
_Simple card strategy, based on Magic: The Gathering rules._
- Home: https://code.google.com/archive/p/wizards-magic/, https://sourceforge.net/projects/wizards-magic/, https://bitbucket.org/chubakur/wizards-magic-old
- Home: https://code.google.com/archive/p/wizards-magic/
- Media: https://web.archive.org/web/20160407053043/https://lgdb.org/game/wizards_magic
- State: mature, inactive since 2012
- Download: https://code.google.com/archive/p/wizards-magic/downloads

View File

@ -1,7 +1,7 @@
[comment]: # (autogenerated content, do not edit)
# Statistics
analyzed 1443 entries on 2020-08-26 15:53:31
analyzed 1443 entries on 2020-08-26 19:30:05
## State