mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
License & doc generator
This commit is contained in:
parent
9e2f264e2f
commit
0305d0039d
1 changed files with 6 additions and 4 deletions
|
@ -46,8 +46,6 @@ def main():
|
|||
with open('yunohost_'+ category +'.py', 'w') as f:
|
||||
in_block = False
|
||||
for line in lines:
|
||||
if re.search(r'^""" yunohost_'+ category, line):
|
||||
in_block = True
|
||||
if in_block:
|
||||
if re.search(r'^"""', line):
|
||||
in_block = False
|
||||
|
@ -57,6 +55,9 @@ def main():
|
|||
else:
|
||||
f.write(line)
|
||||
|
||||
if re.search(r'^""" yunohost_'+ category, line):
|
||||
in_block = True
|
||||
|
||||
for action, action_params in category_params['actions'].items():
|
||||
if 'action_help' not in action_params:
|
||||
action_params['action_help'] = ''
|
||||
|
@ -94,8 +95,6 @@ def main():
|
|||
in_block = False
|
||||
first_quotes = True
|
||||
for line in lines:
|
||||
if re.search(r'^def '+ category +'_'+ action, line):
|
||||
in_block = True
|
||||
if in_block:
|
||||
if re.search(r'^ """', line):
|
||||
if first_quotes:
|
||||
|
@ -107,6 +106,9 @@ def main():
|
|||
else:
|
||||
f.write(line)
|
||||
|
||||
if re.search(r'^def '+ category +'_'+ action, line):
|
||||
in_block = True
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
|
Loading…
Reference in a new issue