#!/usr/bin/env python3
#-*- coding: utf-8 -*-
#pylint: disable-msg=
"""
File       : mkEDFilter
Author     : Valentin Kuznetsov <vkuznet@gmail.com>
Description: mkEDFilter code
"""

# system modules
import sys

if  sys.version_info < (2, 6):
    raise Exception("This script requires python 2.6 or greater")

# package modules
from FWCore.Skeletons.cms import generate, config

def pkg_help():
    "mkEDFilter help function"
    msg  = '\nmkedfltr script generates CMS EDFilter code'
    msg += '\nUsage  : mkFilter MyFilter -author "FirstName LastName"'
    msg += '\nOutput : '
    msg += """
        MyFilter/
        |  plugins/
        |  |-- BuildFile.xml
        |  |-- MyFilter.cc
        |  python/
        |  test/
        |  doc/
        """
    msg += '\nExample:'
    msg += '\n        # create new EDFilter code'
    msg += '\n        mkFilter MyFilter'
    msg += '\n        # create new EDFilter code with given author'
    msg += '\n        mkFilter MyFilter -author "First Last"'
    msg += '\n'
    return msg

if __name__ == '__main__':
    generate(config('EDFilter', pkg_help()))
