[game-data-packager] 02/02: Wikilinks: add links for expansions

Alexandre Detiste detiste-guest at moszumanska.debian.org
Mon Oct 5 08:35:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

detiste-guest pushed a commit to branch master
in repository game-data-packager.

commit a09f64d94db3f1f19dd1fc9d1c7a8e50d35a6ae7
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date:   Mon Oct 5 10:34:45 2015 +0200

    Wikilinks: add links for expansions
---
 data/doom2.yaml                |  2 ++
 data/hexen.yaml                |  1 +
 game_data_packager/__init__.py | 13 ++++++++++---
 3 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/data/doom2.yaml b/data/doom2.yaml
index ef4062b..cf67dea 100644
--- a/data/doom2.yaml
+++ b/data/doom2.yaml
@@ -37,6 +37,7 @@ packages:
 
   doom2-nerve-wad:
     longname: "Doom 2: No Rest for the Living"
+    wiki: No_Rest_for_the_Living
     expansion_for: doom2-wad
     engine: prboom-plus | boom-engine
     steam:
@@ -51,6 +52,7 @@ packages:
 
   doom2-masterlevels-wad:
     longname: Master Levels for DOOM II
+    wiki: Master_Levels_for_Doom_II
     expansion_for: doom2-wad
     main_wads: {}
     steam:
diff --git a/data/hexen.yaml b/data/hexen.yaml
index 2a6d53c..71e270a 100644
--- a/data/hexen.yaml
+++ b/data/hexen.yaml
@@ -35,6 +35,7 @@ packages:
 
   hexen-deathkings-wad:
     longname: "Hexen: Deathkings of the Dark Citadel"
+    wiki: Hexen:_Deathkings_of_the_Dark_Citadel
     debian:
       breaks: chocolate-doom (<< 2)
       replaces: hexen-deathkings-data
diff --git a/game_data_packager/__init__.py b/game_data_packager/__init__.py
index f93ff7b..a7271aa 100644
--- a/game_data_packager/__init__.py
+++ b/game_data_packager/__init__.py
@@ -167,6 +167,9 @@ class GameDataPackage(object):
         # overide the game engine when needed
         self.engine = None
 
+        # expansion's dedicated Wiki page, appended to GameData.wikibase
+        self.wiki = None
+
         # depedency information needed to build the debian/control file
         self.debian = {}
 
@@ -310,7 +313,7 @@ class GameData(object):
         # list of ISO-639 codes
         self.missing_langs = []
 
-        # The game genre
+        # The game genre, as seen in existing .desktop files or
         # http://en.wikipedia.org/wiki/List_of_video_game_genres
         self.genre = None
 
@@ -349,7 +352,7 @@ class GameData(object):
         self.compress_deb = True
 
         for k in ('longname', 'copyright', 'compress_deb', 'help_text', 
-                  'engine', 'genre', 'missing_langs', 'franchise', 'wiki',
+                  'engine', 'genre', 'missing_langs', 'franchise', 'wiki', 'wikibase',
                   'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wikipedia'):
             if k in self.data:
                 setattr(self, k, self.data[k])
@@ -492,6 +495,10 @@ class GameData(object):
         wikis = list()
         if self.wiki:
             wikis.append(self.wikibase + self.wiki)
+        for p in sorted(self.packages.keys()):
+            package = self.packages[p]
+            if package.wiki:
+                wikis.append(self.wikibase + package.wiki)
         if self.wikipedia:
             wikis.append(self.wikipedia)
         if wikis:
@@ -537,7 +544,7 @@ class GameData(object):
                 'install_to_docdir', 'install_contents_of', 'debian',
                 'rip_cd', 'architecture', 'aliases', 'better_version', 'langs',
                 'copyright', 'engine', 'lang', 'component', 'section',
-                'steam', 'gog', 'dotemu', 'origin', 'url_misc'):
+                'steam', 'gog', 'dotemu', 'origin', 'url_misc', 'wiki'):
             if k in d:
                 setattr(package, k, d[k])
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git



More information about the Pkg-games-commits mailing list