]>
Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/make_readme.py
7f2ea319cca5c7c3433665c534758e93fedf8f89
4 README_FILE
= 'README.md'
5 helptext
= sys
.stdin
.read()
7 with open(README_FILE
) as f
:
10 header
= oldreadme
[:oldreadme
.index('# OPTIONS')]
11 footer
= oldreadme
[oldreadme
.index('# CONFIGURATION'):]
13 options
= helptext
[helptext
.index(' General Options:')+19:]
14 options
= re
.sub(r
'^ (\w.+)$', r
'## \1', options
, flags
=re
.M
)
15 options
= '# OPTIONS\n' + options
+ '\n'
17 with open(README_FILE
, 'w') as f
: