[library-web/responsive] made fragment extraction configurable
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [library-web/responsive] made fragment extraction configurable
- Date: Fri, 1 Feb 2013 14:04:47 +0000 (UTC)
commit a01f02a34e21fdb537f74452a7ad115972a5ef4f
Author: FrÃdÃric PÃters <fpeters 0d be>
Date: Fri Feb 1 15:03:34 2013 +0100
made fragment extraction configurable
create_raw_fragments = {
'gnome-devel-getting-started': ['index.page'],
'gnome-devel-demos': ['js.page'],
}
src/config.py | 2 +-
src/defaults.lgorc | 3 +++
src/modtypes/mallard.py | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/config.py b/src/config.py
index a68a846..e2097b3 100644
--- a/src/config.py
+++ b/src/config.py
@@ -37,7 +37,7 @@ _known_keys = ['ftp_gnome_org_local_copy', 'use_latest_version',
'httxt2dbm_path', 'fast_mode', 'create_tarballs',
'symbols_sqlite_filepath', 'nightly_tarballs_location',
'channels', 'doc_path_template', 'indexes_xsl_file',
- 'baseref']
+ 'baseref', 'create_raw_fragments']
class Config:
def __init__(self, filename=_default_lgorc):
diff --git a/src/defaults.lgorc b/src/defaults.lgorc
index 4c899e1..5adc474 100644
--- a/src/defaults.lgorc
+++ b/src/defaults.lgorc
@@ -73,3 +73,6 @@ doc_path_template = '/%(channel)s/%(module)s/'
# xsl file to use to create index.html files
indexes_xsl_file = None
+
+# pages to process so they can be inserted using xsl document() function
+create_raw_fragments = {}
diff --git a/src/modtypes/mallard.py b/src/modtypes/mallard.py
index 1dbf58b..c92f1b2 100644
--- a/src/modtypes/mallard.py
+++ b/src/modtypes/mallard.py
@@ -389,7 +389,7 @@ class MallardModule(DocModule):
if rc != 0:
logging.warn('%s failed with error %d' % (' '.join(cmd), rc))
- if doc_page == 'index.page':
+ if doc_page in app.config.create_raw_fragments.get(self.modulename):
# extract the contents of the index page to a raw html
# snippet, that can be used later by the xsl document()
# function
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]