1
0
mirror of https://github.com/kakwa/uts-server synced 2024-11-04 17:08:49 +01:00

fixing some issues with the configuration table generator

This commit is contained in:
kakwa 2016-09-10 03:22:04 +02:00
parent 5735ced73b
commit 7fa609bfbf
2 changed files with 35 additions and 30 deletions

View File

@ -123,7 +123,7 @@ Main configuration section (mostly http configuration).
| throttle | Limit download speed for clients. | \*=0 | | throttle | Limit download speed for clients. | \*=0 |
| | | | | | | |
| | throttle is a comma-separated list of key=value pairs: | | | | throttle is a comma-separated list of key=value pairs: | |
| | - * -> limit speed for all connections | | | | - \* -> limit speed for all connections | |
| | - x.x.x.x/mask -> limit speed for specified subnet | | | | - x.x.x.x/mask -> limit speed for specified subnet | |
| | | | | | | |
| | The value is a floating-point number of bytes per second, | | | | The value is a floating-point number of bytes per second, | |
@ -194,6 +194,7 @@ Example of timestamp section configuration.
| tsa_name | Must the TSA name be included in the reply? (optional, default: no) | yes | | tsa_name | Must the TSA name be included in the reply? (optional, default: no) | yes |
+-----------------------------+---------------------------------------------------------------------+--------------------------------------+ +-----------------------------+---------------------------------------------------------------------+--------------------------------------+
Building Building
-------- --------

View File

@ -75,8 +75,12 @@ for section in sorted(docs):
for line in docs[section]['vars'][var]['desc'].split('\n'): for line in docs[section]['vars'][var]['desc'].split('\n'):
if first: if first:
first = False first = False
print_line(var, line, docs[section]['vars'][var]['val']) print_line(
re.sub('\*', '\\*', var),
re.sub('\*', '\\*', line),
re.sub('\*', '\\*', docs[section]['vars'][var]['val']),
)
else: else:
print_line('', line, '') print_line('', re.sub('\*', '\\*', line), '')
print('+-' + '-' * max_var + '-+-' + '-' * max_desc + '-+-' + '-' * max_val + '-+') print('+-' + '-' * max_var + '-+-' + '-' * max_desc + '-+-' + '-' * max_val + '-+')
print('') print('')