#!/usr/bin/env python
# -*- coding: utf-8 -*-

# Copyright (C) 2012 by Alex Brandt <alunduil@alunduil.com>
#
# This program is free software; you can redistribute it and#or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the License, or (at your option) any later
# version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA  02111-1307, USA.

import textwrap

from pmort.parameters import PostMortemParameters

def main():
    output = [ "# " + line for line in textwrap.wrap("".join([
        "Example configuration for pmort that controls various components of ",
        "the daemon's execution.  All values provided for parameters are ",
        "default values.",
        ]), 78) ]
    output.append("")
    output.append("[DEFAULT]")
    output.append("")
    for parameter in PostMortemParameters:
        output.extend([ "# " + line for line in textwrap.wrap(parameter["help"], 78) ])
        output.append("#{0} = {1}".format(parameter["option_strings"][0][2:], parameter["default"]))
        output.append("")
    for line in output:
        print line

if __name__ == "__main__":
    main()

