Permalink
Browse files

Add boilerplate filename to the config file, and use the new config s…

…etting in boilerplate.py.
  • Loading branch information...
hober committed Nov 27, 2012
1 parent d6e8719 commit a0d090d13c077fda572f1ab3092253f066dec807
Showing with 5 additions and 8 deletions.
  1. +1 −8 boilerplate.py
  2. +4 −0 default-config.json
View
@@ -9,14 +9,7 @@ def main(stdin, stdout, select='w3c-html'):
bp_dir = os.path.join(config.rel_to_me(conf["path"], __file__), "boilerplate")
# select document
- if select == '2dcontext':
- header = open(os.path.join(bp_dir, "header-w3c-html-2dcontext")).read()
- elif select == 'microdata':
- header = open(os.path.join(bp_dir, "header-w3c-html-microdata")).read()
- elif select == 'srcset':
- header = open(os.path.join(bp_dir, "header-w3c-html-srcset")).read()
- else:
- header = open(os.path.join(bp_dir, "header-w3c-html-core")).read()
+ header = open(os.path.join(bp_dir, conf["boilerplate"])).read()
# remove instructions
header = re.compile('<!-- .*? -->\n?', re.S).sub('', header)
View
@@ -2,20 +2,24 @@
"html": {
"path": "../html"
, "branch": "CR"
+ , "boilerplate": "header-w3c-html-core"
}
, "2dcontext": {
"path": "../html"
, "branch": "html5_canvas_CR"
+ , "boilerplate": "header-w3c-html-2dcontext"
}
, "microdata": {
"path": "../html"
, "branch": "CR"
+ , "boilerplate": "header-w3c-html-microdata"
}
, "polyglot": {
"url": "http://dev.w3.org/html5/html-xhtml-author-guide/html-xhtml-authoring-guide-ED-COPY.htm"
}
, "srcset": {
"path": "../html"
, "branch": "w3c-srcset"
+ , "boilerplate": "header-w3c-html-srcset"
}
}

0 comments on commit a0d090d

Please sign in to comment.