File: readme.py

package info (click to toggle)
python3-dmm 0.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 540 kB
  • sloc: python: 441; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 626 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""
readme functions for for dmm.
"""

import os
from datetime import date
# TODO: the date should come from our framework

def recipe_run(config, globalconf):
    """
    Perform actions for readme module
    """
    template = config['template']
    destination = config['destination'] + "/"
    filename = config['filename']
    product = config['name']
    version = config['version']
    readme = open(template).read().replace("__PRODUCT__", product).replace("__VERSION__", version).replace("__DATE__", str(date.today()))
    readme_w = open(destination + filename, 'w')
    readme_w.write(readme)
    readme_w.close()