[cpl-plugin-uves] 01/03: Improve HTML documentation (a little bit)
Ole Streicher
olebole-guest at moszumanska.debian.org
Sun Dec 8 14:53:49 UTC 2013
This is an automated email from the git hooks/post-receive script.
olebole-guest pushed a commit to branch debian
in repository cpl-plugin-uves.
commit 5f2714dafb06edc79bb71d4ba76ab8e4ba84c568
Author: Ole Streicher <debian at liska.ath.cx>
Date: Sun Dec 8 15:14:47 2013 +0100
Improve HTML documentation (a little bit)
---
debian/create_sphinx.py | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/debian/create_sphinx.py b/debian/create_sphinx.py
index be553f9..f43a505 100644
--- a/debian/create_sphinx.py
+++ b/debian/create_sphinx.py
@@ -157,30 +157,29 @@ def get_description(s):
o = []
l = s.splitlines()
enabled = True
+ in_code = False
for i, s in enumerate(l):
if "BASIC PARAMETERS" in s:
enabled = False
elif "Examples:" in s:
enabled = False
- elif "Input files" in s:
- enabled = True
- o += ["Input files", "^^^^^^^^^^^^", "::"]
- if len(l[i+1]) != 0:
- o += [""]
- elif "Output files" in s:
- enabled = True
- o += ["Output files", "^^^^^^^^^^^^", "::"]
- if len(l[i+1]) != 0:
- o += [""]
elif not enabled:
continue
elif "-"*40 in s:
pass
elif len(s) == 0:
- o += [ s ]
- elif s[-1] == ".":
+ o += [ "" ]
+ elif (s[-1] == "." or s[-1] == ":")and not in_code:
o += [ s, "" ]
+ elif " : " in s or (s.startswith(" ") and ' ' in s):
+ if not in_code:
+ o += ["::", ""]
+ in_code = True
+ o += [ " " + s ]
+ elif in_code and s.startswith(" "):
+ o += [ " " + s ]
else:
+ in_code = False
o += [ s ]
return "\n".join(o)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/cpl-plugin-uves.git
More information about the debian-science-commits
mailing list