"""Report generation.
"""
-import subprocess
import logging
import datetime
-from os import makedirs, environ
-from os.path import isdir
-from shutil import copy, Error, make_archive
+from shutil import make_archive
from utils import get_files, execute_command, archive_input_data
-from errors import PresentationError
# .css file for the html format of the report
'-b html -E ' \
'-t html ' \
'-D release={release} ' \
- '-D version="{release} report - {date}" ' \
+ '-D version="{release} report\n{date}" ' \
'{working_dir} ' \
'{build_dir}/'
'-b latex -E ' \
'-t latex ' \
'-D release={release} ' \
- '-D version="{release} report - {date}" ' \
+ '-D version="{release} report\n{date}" ' \
'{working_dir} ' \
'{build_dir}'
cmd = HTML_BUILDER.format(
release=release,
- date=datetime.date.today().strftime('%d-%b-%Y'),
+ date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
build_dir=spec.environment["paths"]["DIR[BUILD,HTML]"])
execute_command(cmd)
build_dir = spec.environment["paths"]["DIR[BUILD,LATEX]"]
cmd = PDF_BUILDER.format(
release=release,
- date=datetime.date.today().strftime('%d-%b-%Y'),
+ date=datetime.datetime.utcnow().strftime('%m/%d/%Y %H:%M UTC'),
working_dir=spec.environment["paths"]["DIR[WORKING,SRC]"],
build_dir=build_dir)
execute_command(cmd)