diff --git a/.gitignore b/.gitignore index a09c56df..4351663e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /.idea +/tools/git archive/* diff --git a/README.md b/README.md index 63f9848a..ef8e5978 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Open Source Games [comment]: # (start of autogenerated content, do not edit) -301 entries +310 entries - **[Action games](games/action/_toc.md)** (1) - **[Adventure games & Visual novels](games/adventure/_toc.md)** (15) - **[Game frameworks](games/framework/_toc.md)** (49) - **[Popular required libraries](games/library/_toc.md)** (22) - **[Role Playing Games](games/rpg/_toc.md)** (66) -- **[Simulation games](games/simulation/_toc.md)** (12) -- **[Strategy games](games/strategy/_toc.md)** (135) +- **[Simulation games](games/simulation/_toc.md)** (13) +- **[Strategy games](games/strategy/_toc.md)** (143) - **[Tools & Manuals](games/misc/_toc.md)** (1) [comment]: # (end of autogenerated content) diff --git a/games/simulation/_toc.md b/games/simulation/_toc.md index e5061c55..6c3cc50d 100644 --- a/games/simulation/_toc.md +++ b/games/simulation/_toc.md @@ -9,6 +9,7 @@ - **[Open Rails](open_rails.md)** (C#, GPL-3.0, mature) - **[Open Transport Tycoon](open_transport_tycoon.md)** (C++, mature) - **[OpenCity](open_city.md)** (C++, beta) +- **[OpenSkyscraper](open_skyscraper.md)** (C++, GPL-2.0, beta) - **[Our Personal Space](our_personal_space.md)** (Ren'py) - **[Pioneer](pioneer.md)** (C++, C, mature) - **[SimuTrans](simutrans.md)** (C++, mature) diff --git a/games/simulation/open_skyscraper.md b/games/simulation/open_skyscraper.md new file mode 100644 index 00000000..20ee3bff --- /dev/null +++ b/games/simulation/open_skyscraper.md @@ -0,0 +1,13 @@ +# OpenSkyscraper + +_Tower simulation game inspired by SimTower._ + +- Home: https://github.com/fabianschuiki/OpenSkyscraper +- State: beta +- Keywords: remake +- Code: https://github.com/fabianschuiki/OpenSkyscraper +- Language(s): C++ +- License: GPL-2.0 + +## Building + diff --git a/games/statistics.md b/games/statistics.md index 4c2197f3..92e5bc17 100644 --- a/games/statistics.md +++ b/games/statistics.md @@ -1,17 +1,17 @@ [comment]: # (autogenerated content, do not edit) # Statistics -analyzed 301 entries on 2018-05-31 08:51:17 +analyzed 310 entries on 2018-06-01 09:22:11 ## State -- mature: 139 (46.2%) -- beta: 115 (38.2%) -- inactive: 107 (35.5%) +- mature: 141 (45.5%) +- beta: 122 (39.4%) +- inactive: 111 (35.8%) ##### Inactive State -zoc (2017), dark_destiny (2016), dnt (2016), polis (2016), wargame (2016), egoboo (2015), epic_of_heroes (2015), free_heroes2_engine (2015), mewl (2015), project_helena (2015), roguish (2015), argentum_online (2014), battles_of_antargis (2014), drop_shock (2014), hale (2014), heroes_of_wing_commander (2014), kingdoms (2014), lips_of_suna (2014), open_tibia (2014), openrpgmaker (2014), rpge (2014), sintel (2014), summoming_wars (2014), turious (2014), xenowar (2014), c_evo (2013), mpango (2013), openrpg (2013), trinity_reign (2013), vegatrek (2013), blacknova_traders (2012), conquests (2012), dark_city (2012), hexwar (2012), outer_space (2012), parpg (2012), solar_empire (2012), thousand_parsec (2012), age_of_magic (2011), atlantis (2011), battlefield_java (2011), dawn (2011), galaxymage_redux (2011), kobolds_quest_2 (2011), kq_lives (2011), open_moo2 (2011), project_diaspora (2011), runesword_ii (2011), song_of_albion (2011), star_control_2 (2011), world_of_phaos (2011), x-force (2011), ai_wars (2010), labyrinth_of_worlds (2010), mercenary_commander (2010), open_homm (2010), radakan (2010), singularity (2010), skrupel (2010), slay (2010), space_trader_for_java (2010), 8kingdoms (2009), alien_assault_traders (2009), annchienta (2009), begin2 (2009), blitzkrieg (2009), dark_oberon (2009), duel_commander (2009), fall_of_imiryn (2009), freetrain (2009), glest (2009), goblin_hack (2009), open_pop (2009), world_of_heroes (2009), a_planets_revenge (2008), attal (2008), freestars (2008), mars_land_of_no_mercy (2008), moopy (2008), sengoky_warring_states_of_japan (2008), space_opera (2008), space_trader_for_windows (2008), armies (2007), silvertree (2007), arthurs_knights (2006), boson (2006), crown_and_cutless (2006), eleconics (2006), jquest (2006), metal_mech (2006), underworld_adventures (2006), galaxyng (2005), h_world (2005), spice_trade (2005), colonization_too (2004), geewhiz (2004), openglad (2004), promisance (2004), t_bots (2004), antichess (2003), civil (2003), machinations (2003), planetary_hoppers (2003), wargamer (2003), umbra (2002), civil_war (2001), operation_citadel (2000) +zoc (2017), dark_destiny (2016), dnt (2016), freerct (2016), polis (2016), wargame (2016), egoboo (2015), epic_of_heroes (2015), free_heroes2_engine (2015), mewl (2015), project_helena (2015), roguish (2015), argentum_online (2014), battles_of_antargis (2014), drop_shock (2014), eternalwinterwars (2014), farcolony (2014), hale (2014), heroes_of_wing_commander (2014), kingdoms (2014), lips_of_suna (2014), open_tibia (2014), openrpgmaker (2014), rpge (2014), sintel (2014), summoming_wars (2014), turious (2014), xenowar (2014), c_evo (2013), mpango (2013), openrpg (2013), trinity_reign (2013), vegatrek (2013), blacknova_traders (2012), conquests (2012), dark_city (2012), golbin_camp (2012), hexwar (2012), outer_space (2012), parpg (2012), solar_empire (2012), thousand_parsec (2012), age_of_magic (2011), atlantis (2011), battlefield_java (2011), dawn (2011), galaxymage_redux (2011), kobolds_quest_2 (2011), kq_lives (2011), open_moo2 (2011), project_diaspora (2011), runesword_ii (2011), song_of_albion (2011), star_control_2 (2011), world_of_phaos (2011), x-force (2011), ai_wars (2010), labyrinth_of_worlds (2010), mercenary_commander (2010), open_homm (2010), radakan (2010), singularity (2010), skrupel (2010), slay (2010), space_trader_for_java (2010), 8kingdoms (2009), alien_assault_traders (2009), annchienta (2009), begin2 (2009), blitzkrieg (2009), dark_oberon (2009), duel_commander (2009), fall_of_imiryn (2009), freetrain (2009), glest (2009), goblin_hack (2009), open_pop (2009), world_of_heroes (2009), a_planets_revenge (2008), attal (2008), freestars (2008), mars_land_of_no_mercy (2008), moopy (2008), sengoky_warring_states_of_japan (2008), space_opera (2008), space_trader_for_windows (2008), armies (2007), silvertree (2007), arthurs_knights (2006), boson (2006), crown_and_cutless (2006), eleconics (2006), jquest (2006), metal_mech (2006), underworld_adventures (2006), galaxyng (2005), h_world (2005), spice_trade (2005), colonization_too (2004), geewhiz (2004), openglad (2004), promisance (2004), t_bots (2004), antichess (2003), civil (2003), machinations (2003), planetary_hoppers (2003), wargamer (2003), umbra (2002), civil_war (2001), operation_citadel (2000) ##### Without state tag (47) @@ -19,24 +19,25 @@ zoc (2017), dark_destiny (2016), dnt (2016), polis (2016), wargame (2016), egobo ## Languages -Without language tag: 19 (6.3%) +Without language tag: 19 (6.1%) civil_war, crimson_fields, dragon_history, evol_online, imperium, land_of_fire, machinations, meritous, murder_in_the_public_domain, open_general, open_moo2, openal, openrpgmaker, parpg, solaris, space_station_13, star_maiden_rio, vegatrek, xconq ##### Language frequency -- C++ (36.8%) -- C (20.2%) -- Java (11.7%) -- Python (8.5%) -- Lua (4.7%) -- Javascript (3.5%) -- C# (2.9%) -- PHP (2.9%) -- Ren'py (1.2%) +- C++ (37.5%) +- C (19.6%) +- Java (11.6%) +- Python (8.2%) +- Lua (4.8%) +- Javascript (3.4%) +- PHP (3.1%) +- C# (2.8%) +- Ren'py (1.1%) - Haxe (0.9%) - Delphi (0.6%) - Delphi Pascal (0.6%) +- Pascal (0.6%) - ActionScript (0.3%) - Ada (0.3%) - Angelscript (0.3%) @@ -48,7 +49,6 @@ civil_war, crimson_fields, dragon_history, evol_online, imperium, land_of_fire, - Kotlin (0.3%) - Lazarus (0.3%) - Objective C (0.3%) -- Pascal (0.3%) - Ruby (0.3%) - Rust (0.3%) - Text (0.3%) @@ -59,9 +59,9 @@ civil_war, crimson_fields, dragon_history, evol_online, imperium, land_of_fire, ## Code licenses -Without license tag: 132 (43.9%) +Without license tag: 141 (45.5%) -8kingdoms, a_planets_revenge, age_of_magic, ai_wars, alien_assault_traders, ancient_beast, antichess, armies, arthurs_knights, atlantis, atrinik, attal, battlefield_java, battles_of_antargis, begin2, blacknova_traders, blitzkrieg, boson, c_evo, caesar_ia, call_to_power2, camelia_girls, catch_challenger, civil_war, civone, clou, colonization_too, conquests, crimson_fields, dark_destiny, dark_oberon, digital, dragon_hunt, drop_shock, duel_commander, eleconics, epic_of_heroes, epoh, evil_cult, evol_online, first_strike, free_heroes2_engine, free_space_colonization, freelords, freerails, freeserf, freespace_colonization, freestars, freetrain, galaxymage_redux, galaxyng, geewhiz, h_world, harris, heroes_of_wesnoth, heroes_of_wing_commander, hexwar, imperium, jagged_alliance2, jquest, jsettlers, kingdoms, knights_and_merchants_remake, kobolds_quest_2, kq_lives, labyrinth_of_worlds, land_of_fire, machinations, mars_land_of_no_mercy, mercenary_commander, meritous, metal_mech, mewl, moopy, mpango, open_general, open_homm, open_moo2, open_panzer, open_pop, open_rails, openglad, openrpg, openrpgmaker, operation_citadel, other_life, outer_space, parpg, pioneers, planetary_hoppers, polis, project_helena, promisance, runesword_ii, scorched_moon, sengoky_warring_states_of_japan, settlers_iii_remake, simple_solitaire, sintel, skrupel, slay, solar_empire, solaris, song_of_albion, space_faring, space_opera, space_station_13, space_trader_for_java, space_trader_for_windows, space_war, spice_trade, star_maiden_rio, stars_nova, supremacy, t_bots, theme_hospital, thousand_parsec, turious, tvtower, underworld_adventures, vcmi, war_of_kingdom, wargame, wargamer, wargus, warzone_2100, wastes_edge, wolfpack_empire, world_of_heroes, x-force, xenowar, zoc +8kingdoms, a_planets_revenge, age_of_magic, ai_wars, alien_assault_traders, ancient_beast, antichess, armies, arthurs_knights, atlantis, atrinik, attal, battlefield_java, battles_of_antargis, begin2, blacknova_traders, blitzkrieg, boson, c_evo, caesar_ia, call_to_power2, camelia_girls, catch_challenger, civil_war, civone, clou, colobot, colonization_too, conquests, crimson_fields, dark_destiny, dark_oberon, devana, digital, dragon_hunt, drop_shock, duel_commander, eleconics, epic_of_heroes, epoh, eternalwinterwars, evil_cult, evol_online, farcolony, first_strike, free_heroes2_engine, free_space_colonization, freelords, freerails, freerct, freeserf, freespace_colonization, freestars, freetrain, galaxymage_redux, galaxyng, geewhiz, golbin_camp, h_world, harris, heroes_of_wesnoth, heroes_of_wing_commander, hexwar, imperium, jagged_alliance2, jquest, jsettlers, kingdoms, knights_and_merchants_remake, kobolds_quest_2, kq_lives, labyrinth_of_worlds, land_of_fire, machinations, mars_land_of_no_mercy, mercenary_commander, meritous, metal_mech, mewl, moopy, mpango, open_general, open_homm, open_moo2, open_panzer, open_pop, open_rails, open_rct2, open_skyscraper, openglad, openrpg, openrpgmaker, operation_citadel, other_life, outer_space, parpg, pioneers, planetary_hoppers, polis, project_helena, promisance, runesword_ii, scorched_moon, sengoky_warring_states_of_japan, settlers_iii_remake, simple_solitaire, sintel, skrupel, slay, solar_empire, solaris, song_of_albion, space_faring, space_opera, space_station_13, space_trader_for_java, space_trader_for_windows, space_war, spice_trade, star_maiden_rio, stars_nova, supremacy, t_bots, theme_hospital, thousand_parsec, turious, tvtower, underworld_adventures, vcmi, war_of_kingdom, wargame, wargamer, wargus, warzone_2100, wastes_edge, wolfpack_empire, world_of_heroes, wyrmsun, x-force, xenowar, zoc ##### Licenses frequency diff --git a/games/strategy/_toc.md b/games/strategy/_toc.md index d87777c6..4d52df96 100644 --- a/games/strategy/_toc.md +++ b/games/strategy/_toc.md @@ -26,6 +26,7 @@ - **[Call to Power 2](call_to_power2.md)** (C++, Custom (Activision CTP2 source EULA), mature) - **[CivOne](civone.md)** (C#, CC0, beta) - **[Civil](civil.md)** (Python, beta, inactive since 2003) +- **[Colobot](colobot.md)** (C++, GPL-3.0, mature) - **[Colonization too](colonization_too.md)** (C++, GPL-2.0, beta, inactive since 2004) - **[Conquests](conquests.md)** (C++, GPL-2.0, mature, inactive since 2012) - **[Corsix Theme Hospital](theme_hospital.md)** (Lua, C++, MIT, mature) @@ -33,12 +34,15 @@ - **[Crown and Cutless](crown_and_cutless.md)** (C++, beta, inactive since 2006) - **[Dark Destiny](dark_destiny.md)** (Java, unclear, mature, inactive since 2016) - **[Dark Oberon](dark_oberon.md)** (C++, GPL-2.0, mature, inactive since 2009) +- **[Devana](devana.md)** (PHP, BSD, beta) - **[Drop Shock](drop_shock.md)** (PHP, mature, inactive since 2014) - **[Duel Commander](duel_commander.md)** (C, GPL-3.0, beta, inactive since 2009) - **[EPOH](epoh.md)** (Javascript, MIT, beta) - **[Eleconics](eleconics.md)** (Java, beta, inactive since 2006) - **[Endgame: Singularity](singularity.md)** (Python, beta, inactive since 2010) +- **[EternalWinterWars](eternalwinterwars.md)** (Java, MIT, beta, inactive since 2014) - **[Evil Cult](evil_cult.md)** (Haxe, Javascript, GPL-3.0, mature) +- **[FAR Colony](farcolony.md)** (Pascal, GPL-3.0, beta, inactive since 2014) - **[First Strike](first_strike.md)** (Java, mature) - **[Free Orion](freeorion.md)** (C++, Python, beta) - **[Free Space Colonization](freespace_colonization.md)** (C, GPL-2.0, beta) @@ -46,6 +50,7 @@ - **[Free heroes2 engine](free_heroes2_engine.md)** (C++, GPL-2.0, beta, inactive since 2015) - **[FreeCol](freecol.md)** (Java, mature) - **[FreeLords](freelords.md)** (Java, GPL-2.0, beta) +- **[FreeRCT](freerct.md)** (C++, GPL-2.0, beta, inactive since 2016) - **[FreeRails](freerails.md)** (Java, beta) - **[Freeciv](freeciv.md)** (C, mature) - **[Freeciv WebGL](freeciv_web.md)** (Javascript, Java, mature) @@ -55,6 +60,7 @@ - **[Gigalomania](gigalomania.md)** (C++) - **[Glest](glest.md)** (C++, mature, inactive since 2009) - **[Globulation2](globulation2.md)** (C++, mature) +- **[Goblin Camp](golbin_camp.md)** (C++, GPL-3.0, beta, inactive since 2012) - **[Greenius' Civil War](civil_war.md)** (beta, inactive since 2001) - **[Harris](harris.md)** (C, Python, GPL-3.0, beta) - **[Heroes of Wesnoth](heroes_of_wesnoth.md)** (C++, beta) @@ -85,6 +91,7 @@ - **[OpenMOO2](open_moo2.md)** (beta, inactive since 2011) - **[OpenPop](open_pop.md)** (C++, GPL-3.0, beta, inactive since 2009) - **[OpenRA](open_ra.md)** (C#, mature) +- **[OpenRCT2](open_rct2.md)** (C++, GPL-3.0, beta) - **[OpenXcom](open_xcom.md)** (C++, mature) - **[Operation Citadel](operation_citadel.md)** (C++, GPL-2.0, beta, inactive since 2000) - **[Outer Space](outer_space.md)** (Python, GPL-2.0, beta, inactive since 2012) @@ -130,6 +137,7 @@ - **[Widelands](widelands.md)** (C++, Lua, mature) - **[Wolfpack Empire](wolfpack_empire.md)** (C, GPL-3.0, mature) - **[World of Heroes](world_of_heroes.md)** (Python, BSD, beta, inactive since 2009) +- **[Wyrmsun](wyrmsun.md)** (Lua, C++, GPL-2.0, mature) - **[X-Force: Fight For Destiny](x-force.md)** (Delphi, GPL-2.0, beta, inactive since 2011) - **[Xconq](xconq.md)** (mature) - **[Xenowar](xenowar.md)** (C, C++, GPL-3.0, mature, inactive since 2014) diff --git a/games/strategy/colobot.md b/games/strategy/colobot.md new file mode 100644 index 00000000..3d5f22f8 --- /dev/null +++ b/games/strategy/colobot.md @@ -0,0 +1,15 @@ +# Colobot + +_Real-time strategy game, where you can program your units (bots) in a language called CBOT, which is similar to C++ and Java._ + +- Home: https://colobot.info/ +- Download: https://colobot.info/download-colobot-gold/ +- State: mature +- Keywords: RTS +- Code: https://github.com/colobot/colobot +- Language(s): C++ +- License: GPL-3.0 + +## Building + +Uses CMake diff --git a/games/strategy/devana.md b/games/strategy/devana.md new file mode 100644 index 00000000..fb94c61e --- /dev/null +++ b/games/strategy/devana.md @@ -0,0 +1,16 @@ +# Devana + +_Browser strategy game._ + +- Home: https://web.archive.org/web/20180419021717/http://devana.eu/, https://sourceforge.net/projects/devana/ +- Download: https://sourceforge.net/projects/devana/files +- State: beta +- Keywords: web +- Code: see download +- Language(s): PHP +- License: BSD + +Main web site is unavailable. + +## Building + diff --git a/games/strategy/eternalwinterwars.md b/games/strategy/eternalwinterwars.md new file mode 100644 index 00000000..f51e5d8c --- /dev/null +++ b/games/strategy/eternalwinterwars.md @@ -0,0 +1,13 @@ +# EternalWinterWars + +_Turn based strategy game with a medieval winter setting._ + +- Home: https://github.com/hinogi/eternalwinterwars +- State: beta, inactive since 2014 +- Code: https://github.com/hinogi/eternalwinterwars +- Language(s): Java +- License: MIT +- Platforms: Android + +## Building + diff --git a/games/strategy/farcolony.md b/games/strategy/farcolony.md new file mode 100644 index 00000000..0c4ab2ab --- /dev/null +++ b/games/strategy/farcolony.md @@ -0,0 +1,12 @@ +# FAR Colony + +_FAR Colony (First Autonomous Remote Colony) is a game of exploration and space colonization being held in the 23th century._ + +- Home: https://code.google.com/archive/p/farcolony/ +- State: beta, inactive since 2014 +- Code: https://github.com/Vakarias/farcolony +- Language(s): Pascal +- License: GPL-3.0 + +## Building + diff --git a/games/strategy/freeciv.md b/games/strategy/freeciv.md index 734f994e..b45de18f 100644 --- a/games/strategy/freeciv.md +++ b/games/strategy/freeciv.md @@ -11,6 +11,9 @@ _Freeciv is a Free and Open Source empire-building strategy game inspired by the - Language(s): C - Code license: GPL-2.0 +See also [FreeCivAC](http://freecivac.sourceforge.net/) which is a patch to FreeCiv to incoporate Alpha Centauri behavior +however inactive since 2002. + ## Building Uses Autoconf diff --git a/games/strategy/freerct.md b/games/strategy/freerct.md new file mode 100644 index 00000000..c4a184a5 --- /dev/null +++ b/games/strategy/freerct.md @@ -0,0 +1,16 @@ +# FreeRCT + +_Game which captures the look, feel and gameplay of the popular games RollerCoaster Tycoon 1 and 2._ + +- Home: https://web.archive.org/web/*/http://www.freerct.org/, http://freerct.blogspot.com/ +- State: beta, inactive since 2016 +- Keywords: inspired (by RCT 1 and 2) +- Code: https://github.com/FreeRCT/FreeRCT +- Language(s): C++ +- License: GPL-2.0 + +Main web site is unavailable. + +## Building + +Uses CMake \ No newline at end of file diff --git a/games/strategy/golbin_camp.md b/games/strategy/golbin_camp.md new file mode 100644 index 00000000..f8470d0c --- /dev/null +++ b/games/strategy/golbin_camp.md @@ -0,0 +1,13 @@ +# Goblin Camp + +_Roguelike citybuilder, inspired by Anno 1404, Dwarf Fortress and Dungeon Keeper._ + +- Home: http://www.goblincamp.com/, https://bitbucket.org/genericcontainer/goblin-camp +- Download: see dome +- State: beta, inactive since 2012 +- Code: https://bitbucket.org/genericcontainer/goblin-camp/src +- Language(s): C++ +- License: GPL-3.0 + +## Building + diff --git a/games/strategy/open_rct2.md b/games/strategy/open_rct2.md new file mode 100644 index 00000000..a2c42aae --- /dev/null +++ b/games/strategy/open_rct2.md @@ -0,0 +1,16 @@ +# OpenRCT2 + +_Re-implementation of RollerCoaster Tycoon 2 (RCT2), expanding the game with new features, fixing original bugs and raising game limits._ + +- Home: https://openrct2.org/ +- Media: {URL} +- Download: https://openrct2.org/downloads +- State: beta +- Keywords: remake, requires original content (from RCT2) +- Code: https://github.com/OpenRCT2/OpenRCT2 +- Language(s): C++ +- License: GPL-3.0 + +## Building + +Uses CMake diff --git a/games/strategy/wyrmsun.md b/games/strategy/wyrmsun.md new file mode 100644 index 00000000..f94e9428 --- /dev/null +++ b/games/strategy/wyrmsun.md @@ -0,0 +1,18 @@ +# Wyrmsun + +_Strategy game which features elements of mythology, history and fiction._ + +- Home: http://andrettin.github.io/ +- Download: https://store.steampowered.com/app/370070/Wyrmsun/ +- State: mature +- Keywords: RTS +- Code: https://github.com/andrettin/wyrmsun, https://github.com/Andrettin/Wyrmgus +- Language(s): Lua, C++ +- License: GPL-2.0 +- Artwork license: GPL-2.0 (many from Battle for Wesnoth) +- Dependencies: Modified Stratagus-Engine + +## Building + +Engine uses CMake + diff --git a/tools/git archive/archives.csv b/tools/git archive/archives.csv new file mode 100644 index 00000000..dc3bd9db --- /dev/null +++ b/tools/git archive/archives.csv @@ -0,0 +1,14 @@ +https://github.com/guillaume-gouchon/island +https://github.com/FreezingMoon/AncientBeast +https://github.com/godrin/antargis +https://github.com/bote-team/bote +https://github.com/Trilarion/civil +https://github.com/SWY1985/CivOne +https://github.com/colobot/colobot +https://github.com/tautvilas/epoh +https://github.com/hinogi/eternalwinterwars +https://github.com/infidel-/cult +https://github.com/Vakarias/farcolony +https://github.com/freeciv/freeciv +https://github.com/freeciv/freeciv-web +https://github.com/freeorion/freeorion \ No newline at end of file diff --git a/tools/git archive/update.py b/tools/git archive/update.py new file mode 100644 index 00000000..43a7ffa5 --- /dev/null +++ b/tools/git archive/update.py @@ -0,0 +1,62 @@ +""" + Clones and/or pulls all the gits listed in archives.csv + + Requires: git executable in the path + + Warning: This may take a long time on the first run and may need a lot of storage space! +""" + +import os +import csv +import subprocess + + +def derive_folder_name(url): + github = 'https://github.com/' + if url.startswith(github): + url = url[len(github):].split('/') + folder = 'github.' + url[0] + '.' + url[1] + '.git' + return folder + + +def clone(url, folder): + result = subprocess.run(["git", "clone", url, folder]) + if result.returncode: + print(result) + + +def pull(): + result = subprocess.run(["git", "pull", "--all"]) + if result.returncode: + print(result) + + +if __name__ == '__main__': + + # get this folder + root_folder = os.path.realpath(os.path.dirname(__file__)) + + # read archives.csv + archives = [] + with open('archives.csv', newline='') as f: + reader = csv.reader(f) + for row in reader: + archives.append(row) + + # loop over archives + for archive in archives: + url = archive[0] + folder = os.path.join(root_folder, derive_folder_name(url)) + + # if not existing do the initial checkout + if not os.path.isdir(folder): + os.chdir(root_folder) + clone(url, folder) + + # pull all + os.chdir(folder) + pull() + + + + diff --git a/games/maintenance.py b/tools/maintenance.py similarity index 98% rename from games/maintenance.py rename to tools/maintenance.py index c5cb13fa..35b37621 100644 --- a/games/maintenance.py +++ b/tools/maintenance.py @@ -326,7 +326,9 @@ def parse_entry(content): regex = re.compile(r"- Language\(s\): (.*)") matches = regex.findall(content) if matches: - languages = matches[0].split(',') + # first remove everything in parenthesis + languages = re.sub(r'\([^)]*\)', '', matches[0]) + languages = languages.split(',') languages = [x.strip() for x in languages] info['language'] = languages @@ -443,7 +445,7 @@ def generate_statistics(): if __name__ == "__main__": # paths - games_path = os.path.abspath(os.path.dirname(__file__)) + games_path = os.path.realpath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'games')) readme_path = os.path.join(games_path, os.pardir, 'README.md') # recount and write to readme