From 8882186bc871e0ae8f1f0de92088fd70048ff209 Mon Sep 17 00:00:00 2001 From: Frederic Peters Date: Mon, 10 Sep 2007 23:11:22 +0000 Subject: [PATCH] new --rebuild-language option, to force rebuilding of pages in a given * README, src/lgo.py: new --rebuild-language option, to force rebuilding of pages in a given language (useful when it gained translations for common elements). svn path=/trunk/; revision=273 --- ChangeLog | 6 ++++++ README | 2 ++ src/lgo.py | 6 +++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 092a301..e8af50b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-09-11 Frederic Peters + + * README, src/lgo.py: new --rebuild-language option, to force + rebuilding of pages in a given language (useful when it gained + translations for common elements). + 2007-09-10 Frederic Peters * data/pages/C/libgo.xml: fixed typo in documentation detected by diff --git a/README b/README index ec4d8d2..979f4c1 100644 --- a/README +++ b/README @@ -24,6 +24,8 @@ options: --rebuild=FILENAME rebuild documentation from FILENAME --rebuild-all rebuild all documents (even those that were already built) + --rebuild-language=LANGUAGE + rebuild all documents in LANGUAGE --skip-extra-tarballs don't look for documentation extra tarballs diff --git a/src/lgo.py b/src/lgo.py index 2780f24..8f0bf83 100755 --- a/src/lgo.py +++ b/src/lgo.py @@ -677,7 +677,8 @@ class GnomeDocUtilsModule(DocModule): continue xml_index_file = os.path.join(web_output_dir, 'index.xml.%s' % lang) - if not app.rebuild_all and os.path.exists(xml_index_file): + if not app.rebuild_all and (app.rebuild_language is None or + lang != app.rebuild_language) and os.path.exists(xml_index_file): mtime = os.stat(xml_index_file)[stat.ST_MTIME] if mtime > max(self.mtime_tarball, self.mtime_xslt_files): logging.debug('using already generated doc in %s' % lang) @@ -1096,6 +1097,8 @@ class Lgo: parser.add_option('--rebuild-all', action = 'store_true', dest = 'rebuild_all', help = 'rebuild all documents (even those that were already built)') + parser.add_option('--rebuild-language', dest = 'rebuild_language', + help = 'rebuild all documents in LANGUAGE', metavar = 'LANGUAGE') parser.add_option('--skip-extra-tarballs', action = 'store_false', dest = 'skip_extra_tarballs', help = "don't look for documentation extra tarballs") @@ -1107,6 +1110,7 @@ class Lgo: self.debug = (self.options.verbose >= 5) self.rebuild_all = self.options.rebuild_all + self.rebuild_language = self.options.rebuild_language if self.options.config: self.config = Config(filename = self.options.config)