X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=generate-documentation.py;h=613dec73940f7c2f11cb6d5fa625e28dd1c67209;hb=85ff97a2a45a31bd7bc73caa2ac92063c62a95b8;hp=056de06dcdf033ae2402e9de876f77f446e591af;hpb=1b89e01f33c071af04e0586163fa3c09ac115b09;p=dygraphs.git diff --git a/generate-documentation.py b/generate-documentation.py index 056de06..613dec7 100755 --- a/generate-documentation.py +++ b/generate-documentation.py @@ -1,4 +1,7 @@ -#!/usr/bin/python +#!/usr/bin/env python + +# Generate docs/options.html + import json import glob import re @@ -18,6 +21,8 @@ for line in file('dygraph-options-reference.js'): elif '' in line: in_json = False elif in_json: + if line.endswith("\\\n"): # hacked in line continuation support with trailing \. + line = line[:-2] js += line # TODO(danvk): better errors here. @@ -68,7 +73,7 @@ for nu, opt in docs.iteritems(): if label not in labels: labels.append(label) -print """ +print """ Dygraphs Options Reference @@ -77,6 +82,9 @@ print """ p.option { padding-left: 25px; } + div.parameters { + padding-left: 15px; + } #nav { position: fixed; } @@ -89,7 +97,7 @@ print """ """ print """ -