mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Typo + fixes for helper doc generation
This commit is contained in:
parent
5126b3e450
commit
a455cae3bf
2 changed files with 8 additions and 4 deletions
|
@ -7,7 +7,7 @@ ynh_die() {
|
|||
|
||||
# Display a message in the 'INFO' logging category
|
||||
#
|
||||
# usage: ynh_info "Some message"
|
||||
# usage: ynh_print_info "Some message"
|
||||
ynh_print_info() {
|
||||
echo "$1" >> "$YNH_STDINFO"
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ def render(data):
|
|||
from ansi2html.style import get_styles
|
||||
|
||||
conv = Ansi2HTMLConverter()
|
||||
shell_css = "\n".join(map(str, get_styles(conv.dark_bg, conv.scheme)))
|
||||
shell_css = "\n".join(map(str, get_styles(conv.dark_bg)))
|
||||
|
||||
def shell_to_html(shell):
|
||||
return conv.convert(shell, False)
|
||||
|
@ -28,6 +28,7 @@ class Parser():
|
|||
|
||||
def __init__(self, filename):
|
||||
|
||||
self.filename = filename
|
||||
self.file = open(filename, "r").readlines()
|
||||
self.blocks = None
|
||||
|
||||
|
@ -43,6 +44,9 @@ class Parser():
|
|||
|
||||
for i, line in enumerate(self.file):
|
||||
|
||||
if line.startswith("#!/bin/bash"):
|
||||
continue
|
||||
|
||||
line = line.rstrip().replace("\t", " ")
|
||||
|
||||
if current_reading == "void":
|
||||
|
@ -64,7 +68,7 @@ class Parser():
|
|||
else:
|
||||
# We're getting out of a comment bloc, we should find
|
||||
# the name of the function
|
||||
assert len(line.split()) >= 1
|
||||
assert len(line.split()) >= 1, "Malformed line %s in %s" % (i, self.filename)
|
||||
current_block["line"] = i
|
||||
current_block["name"] = line.split()[0].strip("(){")
|
||||
# Then we expect to read the function
|
||||
|
@ -143,11 +147,11 @@ class Parser():
|
|||
b["usage"] = b["usage"].strip()
|
||||
|
||||
|
||||
|
||||
def is_global_comment(line):
|
||||
return line.startswith('#')
|
||||
|
||||
def malformed_error(line_number):
|
||||
import pdb; pdb.set_trace()
|
||||
return "Malformed file line {} ?".format(line_number)
|
||||
|
||||
def main():
|
||||
|
|
Loading…
Add table
Reference in a new issue