deleted and added entries
This commit is contained in:
@ -132,6 +132,7 @@
|
||||
"https://github.com/Trilarion/jquest.git",
|
||||
"https://github.com/Trilarion/low.git",
|
||||
"https://github.com/Trilarion/mars.git",
|
||||
"https://github.com/Trilarion/monstrosity.git",
|
||||
"https://github.com/Trilarion/mpango.git",
|
||||
"https://github.com/Trilarion/radakan.git",
|
||||
"https://github.com/Trilarion/rpdungeon.git",
|
||||
@ -230,6 +231,8 @@
|
||||
"https://github.com/jwvhewitt/gearhead-1.git",
|
||||
"https://github.com/jwvhewitt/gearhead-2.git",
|
||||
"https://github.com/jwvhewitt/gearhead-caramel.git",
|
||||
"https://github.com/landoffire/lof-tmwa-client-data.git",
|
||||
"https://github.com/landoffire/lof-tmwa-server-data.git",
|
||||
"https://github.com/leethomason/unflobtactical.git",
|
||||
"https://github.com/liballeg/allegro5.git",
|
||||
"https://github.com/libgdx/libgdx.git",
|
||||
@ -241,6 +244,8 @@
|
||||
"https://github.com/mana/manaserv.git",
|
||||
"https://github.com/marcusmoller/pyorpg-client.git",
|
||||
"https://github.com/marcusmoller/pyorpg-server.git",
|
||||
"https://github.com/matthewgrimes/hexgame.git",
|
||||
"https://github.com/matthewgrimes/itbs-code.git",
|
||||
"https://github.com/mgfreshour/hexwar.git",
|
||||
"https://github.com/mitallast/diablo-js.git",
|
||||
"https://github.com/mordrax/cotwmtor.git",
|
||||
@ -378,7 +383,6 @@
|
||||
"http://svn.uktrainsim.com/svn/openrails/trunk",
|
||||
"https://svn.code.sf.net/p/ageofmagic/code/",
|
||||
"https://svn.code.sf.net/p/atomiks/code/",
|
||||
"https://svn.code.sf.net/p/begin2/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/",
|
||||
@ -390,7 +394,6 @@
|
||||
"https://svn.code.sf.net/p/fsc/code/",
|
||||
"https://svn.code.sf.net/p/kralovstvi/code/",
|
||||
"https://svn.code.sf.net/p/opencity/code/",
|
||||
"https://svn.code.sf.net/p/opengeneral/code/",
|
||||
"https://svn.code.sf.net/p/openpopulous/code/",
|
||||
"https://svn.code.sf.net/p/opensnc/code/",
|
||||
"https://svn.code.sf.net/p/pio/code/",
|
||||
|
@ -249,25 +249,31 @@ def parse_entry(content):
|
||||
info = {}
|
||||
|
||||
# read title
|
||||
regex = re.compile(r"^# (.*)")
|
||||
regex = re.compile(r"^# (.*)") # start of content, starting with "# " and then everything until the end of line
|
||||
matches = regex.findall(content)
|
||||
assert len(matches) == 1
|
||||
assert matches[0]
|
||||
info['title'] = matches[0]
|
||||
|
||||
# read description
|
||||
regex = re.compile(r"^.*\n\n_(.*)_\n")
|
||||
regex = re.compile(r"^.*\n\n_(.*)_\n") # third line from top, everything between underscores
|
||||
matches = regex.findall(content)
|
||||
assert len(matches) == 1, info['title']
|
||||
assert matches[0]
|
||||
info['description'] = matches[0]
|
||||
|
||||
# first read all field names
|
||||
regex = re.compile(r"^- (.*?): ", re.MULTILINE)
|
||||
regex = re.compile(r"^- (.*?): ", re.MULTILINE) # start of each line having "- ", then everything until a colon, then ": "
|
||||
fields = regex.findall(content)
|
||||
|
||||
valid_fields = ('Home', 'Media', 'State', 'Play', 'Download', 'Platform', 'Keywords', 'Code repository', 'Code language', 'Code license', 'Code dependencies', 'Assets license', 'Build system', 'Build instructions')
|
||||
|
||||
# iterate over found field
|
||||
for field in fields:
|
||||
# check if in valid fields
|
||||
if field not in valid_fields:
|
||||
print("warning: field {} not valid".format(field))
|
||||
|
||||
regex = re.compile(r"- {}: (.*)".format(field))
|
||||
matches = regex.findall(content)
|
||||
assert len(matches) == 1 # every field should only be present once
|
||||
|
Reference in New Issue
Block a user