imported some svn repositories to git, improved html
This commit is contained in:
parent
5e77f1e9a8
commit
a8339cfa91
14
README.md
14
README.md
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
404 entries
|
404 entries
|
||||||
- **[Action/Arcade games](games/action/_toc.md)** (17)
|
- **[Action/Arcade](games/action/_toc.md)** (17)
|
||||||
- **[Adventure games & Visual novels](games/adventure/_toc.md)** (15)
|
- **[Adventure & Visual novels](games/adventure/_toc.md)** (15)
|
||||||
- **[Game frameworks](games/framework/_toc.md)** (52)
|
- **[Engines & Frameworks](games/framework/_toc.md)** (52)
|
||||||
- **[Popular required libraries](games/library/_toc.md)** (22)
|
- **[Libraries](games/library/_toc.md)** (22)
|
||||||
- **[Role Playing Games](games/rpg/_toc.md)** (106)
|
- **[Role Playing](games/rpg/_toc.md)** (106)
|
||||||
- **[Simulation games](games/simulation/_toc.md)** (15)
|
- **[Simulation](games/simulation/_toc.md)** (15)
|
||||||
- **[Strategy games](games/strategy/_toc.md)** (165)
|
- **[Strategy](games/strategy/_toc.md)** (165)
|
||||||
- **[Tools & Manuals](games/misc/_toc.md)** (12)
|
- **[Tools & Manuals](games/misc/_toc.md)** (12)
|
||||||
|
|
||||||
[comment]: # (end of autogenerated content)
|
[comment]: # (end of autogenerated content)
|
||||||
|
@ -1 +1 @@
|
|||||||
Is powered by Vanilla-Datatables (https://github.com/Mobius1/Vanilla-DataTables) under MIT license.
|
Is powered by Vanilla-Datatables (https://github.com/Mobius1/Vanilla-DataTables) under MIT license, slightly modified.
|
2015
docs/data.json
2015
docs/data.json
File diff suppressed because it is too large
Load Diff
@ -7,6 +7,15 @@
|
|||||||
<script type="text/javascript" src="vanilla-dataTables.js"></script>
|
<script type="text/javascript" src="vanilla-dataTables.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<h1>Open source games collection</h1>
|
||||||
|
<p>This collection is managed on <a href="https://github.com/Trilarion/opensourcegames">Github</a> (development <a href="https://trilarion.blogspot.com/search/label/osgames">blog</a>).</p>
|
||||||
|
<ul>
|
||||||
|
<li>Over 400 entries. About 60% of them are mature and about 40% are currently inactive.</li>
|
||||||
|
<li>Mostly written in C++, C, Java, Python, Lua, Javascript or PHP.</li>
|
||||||
|
<li>Mostly published under GPL-2.0/3.0, MIT or Apache-2.0 license.</li>
|
||||||
|
<li>Tagged with keywords like: TBS, RTS, roguelike, remake, MMO, ..</li>
|
||||||
|
</ul>
|
||||||
|
<p>Columns in the table can be sorted and the rows can be filtered using the "Search" field.</p>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<table class="table"></table>
|
<table class="table"></table>
|
||||||
</div>
|
</div>
|
||||||
@ -22,5 +31,6 @@
|
|||||||
dataTable.columns().sort(1);
|
dataTable.columns().sort(1);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
Dynamic table powered by <a href="https://github.com/Mobius1/Vanilla-DataTables">Vanilla-DataTables</a>.
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
@ -1,4 +1,4 @@
|
|||||||
# Action/Arcade games
|
# Action/Arcade
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[Astromenace](atromenace.md)** (C++, C, GPL-3.0, mature)
|
- **[Astromenace](atromenace.md)** (C++, C, GPL-3.0, mature)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Adventure games & Visual novels
|
# Adventure & Visual novels
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[AdaVenture](adaventure.md)** (Ada, GPL-3.0, mature)
|
- **[AdaVenture](adaventure.md)** (Ada, GPL-3.0, mature)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Star Maiden Rio
|
# Star Maiden Rio
|
||||||
|
|
||||||
|
_Visual Novel._
|
||||||
|
|
||||||
- Home: http://nyaatrap.blog.fc2.com/blog-entry-20.html
|
- Home: http://nyaatrap.blog.fc2.com/blog-entry-20.html
|
||||||
- Download: http://www.mediafire.com/file/jog3fcfxgsyd03f/Astraea_Rio-1.05-all.zip
|
- Download: http://www.mediafire.com/file/jog3fcfxgsyd03f/Astraea_Rio-1.05-all.zip
|
||||||
- State: mature
|
- State: mature
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Game frameworks
|
# Engines & Frameworks
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[Allegro](allegro.md)** (C, zlib, mature)
|
- **[Allegro](allegro.md)** (C, zlib, mature)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Popular required libraries
|
# Libraries
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[Boost (C++ Libraries)](boost.md)** (C++, Boost license 1.0, mature)
|
- **[Boost (C++ Libraries)](boost.md)** (C++, Boost license 1.0, mature)
|
||||||
|
@ -6,7 +6,7 @@ _Role-playing game mapping program._
|
|||||||
- Download: https://sourceforge.net/projects/autorealm/files
|
- Download: https://sourceforge.net/projects/autorealm/files
|
||||||
- State: mature
|
- State: mature
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/autorealm/code/ci/master/tree/
|
- Code repository: https://git.code.sf.net/p/autorealm/code, https://git.code.sf.net/p/autorealm/http (+), https://git.code.sf.net/p/autorealm/delphi (+)
|
||||||
- Code language: C++
|
- Code language: C++
|
||||||
- Code license: GPL-3.0
|
- Code license: GPL-3.0
|
||||||
- Dependencies: wxWidgets
|
- Dependencies: wxWidgets
|
||||||
|
@ -6,7 +6,7 @@ _GameMaster (i.e. role-playing) utility._
|
|||||||
- Download: https://sourceforge.net/projects/deity/files
|
- Download: https://sourceforge.net/projects/deity/files
|
||||||
- State: mature, inactive since 2014
|
- State: mature, inactive since 2014
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/deity/code/HEAD/tree/
|
- Code repository: https://github.com/Trilarion/deity (import of the svn), https://svn.code.sf.net/p/deity/code/ (svn)
|
||||||
- Code language: Python
|
- Code language: Python
|
||||||
- Code license: GPL-2.0
|
- Code license: GPL-2.0
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ _Map your dungeons for your next role playing adventure._
|
|||||||
- Download: https://sourceforge.net/projects/dungeonmap/files
|
- Download: https://sourceforge.net/projects/dungeonmap/files
|
||||||
- State: beta, inactive since 2013
|
- State: beta, inactive since 2013
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/dungeonmap/code/HEAD/tree/
|
- Code repository: https://github.com/Trilarion/dungeonmap (import of svn), https://svn.code.sf.net/p/dungeonmap/code/trunk (svn)
|
||||||
- Code language: C++
|
- Code language: C++
|
||||||
- Code license: GPL-3.0
|
- Code license: GPL-3.0
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ _Game/Dungeon Master aid for role playing._
|
|||||||
- Download: https://sourceforge.net/projects/gm-tools/files
|
- Download: https://sourceforge.net/projects/gm-tools/files
|
||||||
- State: beta, inactive since 2004
|
- State: beta, inactive since 2004
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/gm-tools/code/
|
- Code repository: https://sourceforge.net/p/gm-tools/code/ (cvs)
|
||||||
- Code language: C++
|
- Code language: C++
|
||||||
- Code license: GPL-2.0
|
- Code license: GPL-2.0
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ _PC and NPC character generator for Rolemaster RMFRP roleplaying system (from Ir
|
|||||||
- Download: https://sourceforge.net/projects/rmoffice/files
|
- Download: https://sourceforge.net/projects/rmoffice/files
|
||||||
- State: mature
|
- State: mature
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/rmoffice/code/ci/master/tree/
|
- Code repository: https://git.code.sf.net/p/rmoffice/code
|
||||||
- Code language: Java
|
- Code language: Java
|
||||||
- Code license: Apache-2.0
|
- Code license: Apache-2.0
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ _Collection of programs and libraries for pen and paper role playing._
|
|||||||
- Download: https://sourceforge.net/projects/rpdungeon/files
|
- Download: https://sourceforge.net/projects/rpdungeon/files
|
||||||
- State: beta, inactive since 2006
|
- State: beta, inactive since 2006
|
||||||
- Keywords: tool
|
- Keywords: tool
|
||||||
- Code repository: https://sourceforge.net/p/rpdungeon/code/HEAD/tree/ (svn)
|
- Code repository: https://github.com/Trilarion/rpdungeon (import of svn), https://sourceforge.net/p/rpdungeon/code/HEAD/tree/ (svn)
|
||||||
- Code language: Pascal
|
- Code language: Pascal
|
||||||
- Code license: GPL-2.0
|
- Code license: GPL-2.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Role Playing Games
|
# Role Playing
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[Andor's Trail](andors_trail.md)** (Java, GPL-2.0, beta)
|
- **[Andor's Trail](andors_trail.md)** (Java, GPL-2.0, beta)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Simulation games
|
# Simulation
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[3d.city](3d_city.md)** (Javascript, GPL-3.0, mature, inactive since 2016)
|
- **[3d.city](3d_city.md)** (Javascript, GPL-3.0, mature, inactive since 2016)
|
||||||
|
@ -5,7 +5,7 @@ _WW2 submarine 3D simulation._
|
|||||||
- Home: http://dangerdeep.sourceforge.net/, https://sourceforge.net/projects/dangerdeep/
|
- Home: http://dangerdeep.sourceforge.net/, https://sourceforge.net/projects/dangerdeep/
|
||||||
- Download: http://dangerdeep.sourceforge.net/downloads/, https://sourceforge.net/projects/dangerdeep/files/
|
- Download: http://dangerdeep.sourceforge.net/downloads/, https://sourceforge.net/projects/dangerdeep/files/
|
||||||
- State: beta, inactive since 2011
|
- State: beta, inactive since 2011
|
||||||
- Code repository: https://sourceforge.net/p/dangerdeep/code/HEAD/tree/ (svn), https://sourceforge.net/p/dangerdeep/git/ci/master/tree/
|
- Code repository: https://git.code.sf.net/p/dangerdeep/git, https://svn.code.sf.net/p/dangerdeep/code/ (svn)
|
||||||
- Code language: C++
|
- Code language: C++
|
||||||
- Code license: GPL-2.0
|
- Code license: GPL-2.0
|
||||||
|
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
_Rail & business simulation._
|
_Rail & business simulation._
|
||||||
|
|
||||||
- Home: http://freetrain.sourceforge.net/
|
- Home: http://freetrain.sourceforge.net/, https://sourceforge.net/projects/freetrain/
|
||||||
- Download: https://sourceforge.net/projects/freetrain/files/
|
- Download: https://sourceforge.net/projects/freetrain/files/
|
||||||
- State: beta, inactive since 2009
|
- State: beta, inactive since 2009
|
||||||
- Code repository: https://sourceforge.net/p/freetrain/code/HEAD/tree/
|
- Code repository: https://github.com/Trilarion/freetrain (import of svn), https://svn.code.sf.net/p/freetrain/code/ (svn)
|
||||||
- Code language: C#
|
- Code language: C#
|
||||||
- Code license: LPGL-2.1
|
- Code license: LPGL-2.1
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[comment]: # (autogenerated content, do not edit)
|
[comment]: # (autogenerated content, do not edit)
|
||||||
# Statistics
|
# Statistics
|
||||||
|
|
||||||
analyzed 404 entries on 2018-06-12 10:49:49
|
analyzed 404 entries on 2018-06-12 14:22:11
|
||||||
|
|
||||||
## State
|
## State
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ _0 A.D. is a free, open-source, cross-platform real-time strategy game._
|
|||||||
- Download: https://play0ad.com/download/
|
- Download: https://play0ad.com/download/
|
||||||
- State: beta
|
- State: beta
|
||||||
- Keywords: RTS
|
- Keywords: RTS
|
||||||
- Code repository: https://svn.wildfiregames.com/public/ps/trunk/ (svn)
|
- Code repository: https://github.com/0ad/0ad (mirror), https://svn.wildfiregames.com/public/ps/trunk/ (svn)
|
||||||
- Code language: C++
|
- Code language: C++
|
||||||
- Code license: GPL-2.0
|
- Code license: GPL-2.0
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Strategy games
|
# Strategy
|
||||||
|
|
||||||
[comment]: # (start of autogenerated content, do not edit)
|
[comment]: # (start of autogenerated content, do not edit)
|
||||||
- **[0AD](0ad.md)** (C++, GPL-2.0, beta)
|
- **[0AD](0ad.md)** (C++, GPL-2.0, beta)
|
||||||
|
@ -5,7 +5,7 @@ _Battlefield Java is simple grid and turned based battle simulation game for Jav
|
|||||||
- Home: https://sourceforge.net/projects/battlefieldjava/
|
- Home: https://sourceforge.net/projects/battlefieldjava/
|
||||||
- Download: https://sourceforge.net/projects/battlefieldjava/files/battlefieldjava/
|
- Download: https://sourceforge.net/projects/battlefieldjava/files/battlefieldjava/
|
||||||
- State: beta, inactive since 2011
|
- State: beta, inactive since 2011
|
||||||
- Code repository: https://git.code.sf.net/p/battlefieldjava/git
|
- Code repository: https://git.code.sf.net/p/battlefieldjava/git, https://sourceforge.net/p/battlefieldjava/cvs/ (cvs)
|
||||||
- Code language: Java
|
- Code language: Java
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,6 +3,14 @@
|
|||||||
"http://repo.or.cz/openal-soft.git",
|
"http://repo.or.cz/openal-soft.git",
|
||||||
"https://anongit.freedesktop.org/git/pkg-config.git",
|
"https://anongit.freedesktop.org/git/pkg-config.git",
|
||||||
"https://anongit.kde.org/katomic.git",
|
"https://anongit.kde.org/katomic.git",
|
||||||
|
"https://git.code.sf.net/p/arianne/marauroa",
|
||||||
|
"https://git.code.sf.net/p/autorealm/code",
|
||||||
|
"https://git.code.sf.net/p/autorealm/delphi",
|
||||||
|
"https://git.code.sf.net/p/autorealm/http",
|
||||||
|
"https://git.code.sf.net/p/battlefieldjava/git",
|
||||||
|
"https://git.code.sf.net/p/dangerdeep/git",
|
||||||
|
"https://git.code.sf.net/p/dropshock/code",
|
||||||
|
"https://git.code.sf.net/p/rmoffice/code",
|
||||||
"https://git.octaforge.org/engine/octaforge.git",
|
"https://git.octaforge.org/engine/octaforge.git",
|
||||||
"https://git.savannah.gnu.org/git/adonthell/adonthell-wastesedge.git",
|
"https://git.savannah.gnu.org/git/adonthell/adonthell-wastesedge.git",
|
||||||
"https://git.savannah.gnu.org/git/freedink.git",
|
"https://git.savannah.gnu.org/git/freedink.git",
|
||||||
@ -12,6 +20,7 @@
|
|||||||
"https://git.savannah.nongnu.org/git/lordsawar.git",
|
"https://git.savannah.nongnu.org/git/lordsawar.git",
|
||||||
"https://git.tukaani.org/xz.git",
|
"https://git.tukaani.org/xz.git",
|
||||||
"https://git.tuxfamily.org/fanwor/fanwor.git",
|
"https://git.tuxfamily.org/fanwor/fanwor.git",
|
||||||
|
"https://github.com/0ad/0ad.git",
|
||||||
"https://github.com/AdamAtomic/flixel.git",
|
"https://github.com/AdamAtomic/flixel.git",
|
||||||
"https://github.com/Ancurio/mkxp.git",
|
"https://github.com/Ancurio/mkxp.git",
|
||||||
"https://github.com/AndO3131/lgeneral.git",
|
"https://github.com/AndO3131/lgeneral.git",
|
||||||
@ -65,6 +74,10 @@
|
|||||||
"https://github.com/Scorched-Moon/server.git",
|
"https://github.com/Scorched-Moon/server.git",
|
||||||
"https://github.com/TVTower/TVTower.git",
|
"https://github.com/TVTower/TVTower.git",
|
||||||
"https://github.com/TobiasBielefeld/Simple-Solitaire.git",
|
"https://github.com/TobiasBielefeld/Simple-Solitaire.git",
|
||||||
|
"https://github.com/Trilarion/deity.git",
|
||||||
|
"https://github.com/Trilarion/dungeonmap.git",
|
||||||
|
"https://github.com/Trilarion/freetrain.git",
|
||||||
|
"https://github.com/Trilarion/rpdungeon.git",
|
||||||
"https://github.com/Trilarion/sge2d.git",
|
"https://github.com/Trilarion/sge2d.git",
|
||||||
"https://github.com/Tuxemon/Tuxemon.git",
|
"https://github.com/Tuxemon/Tuxemon.git",
|
||||||
"https://github.com/Vakarias/farcolony.git",
|
"https://github.com/Vakarias/farcolony.git",
|
||||||
|
@ -6,12 +6,13 @@
|
|||||||
Warning: This may take a long time on the first run and may need a lot of storage space!
|
Warning: This may take a long time on the first run and may need a lot of storage space!
|
||||||
|
|
||||||
TODO are really all existing branches cloned and pulled? (see https://stackoverflow.com/questions/67699/how-to-clone-all-remote-branches-in-git)
|
TODO are really all existing branches cloned and pulled? (see https://stackoverflow.com/questions/67699/how-to-clone-all-remote-branches-in-git)
|
||||||
TODO detect unused folders?
|
TODO Sourceforge git clone may not work all the time (restart the script helps..)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
def read_text(file):
|
def read_text(file):
|
||||||
@ -22,6 +23,7 @@ def read_text(file):
|
|||||||
text = f.read()
|
text = f.read()
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
||||||
def derive_folder_name(url):
|
def derive_folder_name(url):
|
||||||
replaces = {
|
replaces = {
|
||||||
'https://github.com': 'github',
|
'https://github.com': 'github',
|
||||||
@ -42,6 +44,7 @@ def derive_folder_name(url):
|
|||||||
url = url[len(generic):]
|
url = url[len(generic):]
|
||||||
return sanitize(url)
|
return sanitize(url)
|
||||||
|
|
||||||
|
|
||||||
def clone(url, folder):
|
def clone(url, folder):
|
||||||
result = subprocess.run(["git", "clone", url, folder])
|
result = subprocess.run(["git", "clone", url, folder])
|
||||||
if result.returncode:
|
if result.returncode:
|
||||||
@ -84,12 +87,14 @@ if __name__ == '__main__':
|
|||||||
for folder, archive in zip(folders, archives):
|
for folder, archive in zip(folders, archives):
|
||||||
if not os.path.isdir(folder):
|
if not os.path.isdir(folder):
|
||||||
clone(archive, folder)
|
clone(archive, folder)
|
||||||
|
time.sleep(0.1) # not sure if this is necessary, but there were some issues with too many git operations
|
||||||
|
|
||||||
# at the end update them all
|
# at the end update them all
|
||||||
for folder in folders:
|
for folder in folders:
|
||||||
# pull all
|
# pull all
|
||||||
os.chdir(folder)
|
os.chdir(folder)
|
||||||
pull()
|
pull()
|
||||||
|
time.sleep(0.1) # not sure if this is necessary, but there were some issues with too many git operations
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@ import urllib.request
|
|||||||
import http.client
|
import http.client
|
||||||
import datetime
|
import datetime
|
||||||
import json
|
import json
|
||||||
|
import textwrap
|
||||||
|
|
||||||
TOC = '_toc.md'
|
TOC = '_toc.md'
|
||||||
|
|
||||||
@ -276,8 +277,16 @@ def parse_entry(content):
|
|||||||
regex = re.compile(r"^# (.*)")
|
regex = re.compile(r"^# (.*)")
|
||||||
matches = regex.findall(content)
|
matches = regex.findall(content)
|
||||||
assert len(matches) == 1
|
assert len(matches) == 1
|
||||||
|
assert matches[0]
|
||||||
info['title'] = matches[0]
|
info['title'] = matches[0]
|
||||||
|
|
||||||
|
# read description
|
||||||
|
regex = re.compile(r"^.*\n\n_(.*)_\n")
|
||||||
|
matches = regex.findall(content)
|
||||||
|
assert len(matches) == 1, info['title']
|
||||||
|
assert matches[0]
|
||||||
|
info['description'] = matches[0]
|
||||||
|
|
||||||
# first read all field names
|
# first read all field names
|
||||||
regex = re.compile(r"^- (.*?): ", re.MULTILINE)
|
regex = re.compile(r"^- (.*?): ", re.MULTILINE)
|
||||||
fields = regex.findall(content)
|
fields = regex.findall(content)
|
||||||
@ -498,7 +507,7 @@ def export_json():
|
|||||||
|
|
||||||
# make database out of it
|
# make database out of it
|
||||||
db = {}
|
db = {}
|
||||||
db['headings'] = ['Game', 'Description', 'Download', 'State', 'Keywords', 'Source']
|
db['headings'] = ['Game', 'Description', 'Download', 'Category', 'State', 'Keywords', 'Source']
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
for info in infos.values():
|
for info in infos.values():
|
||||||
@ -509,7 +518,7 @@ def export_json():
|
|||||||
entry.append('{} (<a href="{}">home</a>, <a href="{}">entry</a>)'.format(info['title'], info['home'][0], ''))
|
entry.append('{} (<a href="{}">home</a>, <a href="{}">entry</a>)'.format(info['title'], info['home'][0], ''))
|
||||||
|
|
||||||
# description
|
# description
|
||||||
entry.append('')
|
entry.append(textwrap.shorten(info['description'], width=80, placeholder='..'))
|
||||||
|
|
||||||
# download
|
# download
|
||||||
field = 'download'
|
field = 'download'
|
||||||
@ -518,6 +527,9 @@ def export_json():
|
|||||||
else:
|
else:
|
||||||
entry.append('')
|
entry.append('')
|
||||||
|
|
||||||
|
# category
|
||||||
|
entry.append(info['category'])
|
||||||
|
|
||||||
# state (field state is essential)
|
# state (field state is essential)
|
||||||
entry.append('{} / {}'.format(info['state'][0], 'inactive since {}'.format(info['inactive']) if 'inactive' in info else 'active'))
|
entry.append('{} / {}'.format(info['state'][0], 'inactive since {}'.format(info['inactive']) if 'inactive' in info else 'active'))
|
||||||
|
|
||||||
@ -529,8 +541,17 @@ def export_json():
|
|||||||
entry.append('')
|
entry.append('')
|
||||||
|
|
||||||
# source
|
# source
|
||||||
text = ''
|
text = []
|
||||||
entry.append(text)
|
field = 'code repository'
|
||||||
|
if field in info and info[field]:
|
||||||
|
text.append('<a href="{}">Source</a>'.format(info[field][0]))
|
||||||
|
field = 'code language'
|
||||||
|
if field in info and info[field]:
|
||||||
|
text.append(', '.join(info[field]))
|
||||||
|
field = 'code license'
|
||||||
|
if field in info and info[field]:
|
||||||
|
text.append(info[field][0])
|
||||||
|
entry.append(' - '.join(text))
|
||||||
|
|
||||||
# append to entries
|
# append to entries
|
||||||
entries.append(entry)
|
entries.append(entry)
|
||||||
@ -558,9 +579,7 @@ def git_repo(repo):
|
|||||||
return repo + '.git'
|
return repo + '.git'
|
||||||
|
|
||||||
# for all others we just check if they start with the typical urls of git services
|
# for all others we just check if they start with the typical urls of git services
|
||||||
|
services = ['https://git.tuxfamily.org/', 'http://git.pond.sub.org/', 'https://gitorious.org/', 'https://git.code.sf.net/p/']
|
||||||
# 'https://git.code.sf.net/p/' currently doesn't work that well
|
|
||||||
services = ['https://git.tuxfamily.org/', 'http://git.pond.sub.org/', 'https://gitorious.org/']
|
|
||||||
for service in services:
|
for service in services:
|
||||||
if repo.startswith(service):
|
if repo.startswith(service):
|
||||||
return repo
|
return repo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user