"""
Run a specific effect
"""
import demosys

HELP = "Runs an effect"


def print_usage():
    print("Usage:")
    print("  runeffect <effectname>")


def run(args):
    effect_name = args[0] if args else None
    if effect_name is None:
        print_usage()
        return

    demosys.setup()
    demosys.run(runeffect=effect_name)

"""
Run a specific effect
"""
import demosys
from demosys.core.management.base import CreateCommand


class Command(CreateCommand):
    help = "Runs an effect"

    def add_arguments(self, parser):
        parser.add_argument("name", help="Name of the effect")

    def handle(self, *args, **options):
        demosys.setup()
        demosys.run(runeffect=options['name'])

Convert runeffect to a Command