]>
Raphaƫl G. Git Repositories - youtubedl/blob - devscripts/prepare_manpage.py
f66bebfea6de2cec60a10f943380b9247e5c3d60
1 from __future__
import unicode_literals
8 ROOT_DIR
= os
.path
.dirname(os
.path
.dirname(os
.path
.abspath(__file__
)))
9 README_FILE
= os
.path
.join(ROOT_DIR
, 'README.md')
11 with io
.open(README_FILE
, encoding
='utf-8') as f
:
14 PREFIX
= '%YOUTUBE-DL(1)\n\n# NAME\n'
15 readme
= re
.sub(r
'(?s)# INSTALLATION.*?(?=# DESCRIPTION)', '', readme
)
16 readme
= PREFIX
+ readme
18 if sys
.version_info
< (3, 0):
19 print(readme
.encode('utf-8'))