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
This commit is contained in:
parent
016ced4ea1
commit
8882186bc8
|
@ -1,3 +1,9 @@
|
|||
2007-09-11 Frederic Peters <fpeters@0d.be>
|
||||
|
||||
* 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 <fpeters@0d.be>
|
||||
|
||||
* data/pages/C/libgo.xml: fixed typo in documentation detected by
|
||||
|
|
2
README
2
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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Reference in New Issue