File: prepare.py

package info (click to toggle)
python-ptk 1.3.8%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 416 kB
  • sloc: python: 3,616; makefile: 200
file content (21 lines) | stat: -rw-r--r-- 458 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-

import codecs

from ptk.meta import PackageInfo

def generateReadme():
    with codecs.getreader('utf-8')(open('README.rst.in', 'rb')) as src:
        contents = src.read()
        contents = contents % PackageInfo.__dict__
        with codecs.getwriter('utf-8')(open('README.rst', 'wb')) as dst:
            dst.write(contents)


def prepare():
    generateReadme()


if __name__ == '__main__':
    prepare()