import click

from flashcards import sets
from flashcards import storage


@click.group('sets')
def sets_group():
    """Command related to the StudySet object """
    pass


@click.command('new')
@click.option('--title', prompt='Title of the study set')
@click.option('--desc', prompt='Description for the study set (optional)')
def new(title, desc):
    """
    Create a new study set.

    User supplies a title and a description.
    If this study set does not exist, it is created.
    """
    study_set = sets.StudySet(title, desc)
    storage.create_study_set_file(study_set)
    click.echo('Study set created !')


sets_group.add_command(new)

@@ -1,12 +1,22 @@
+import os%0A
 import click
@@ -630,32 +630,278 @@
 )%0A%0A%0A
-sets_group.add_command(new
+@click.command('select')%0A@click.argument('studyset')%0Adef select(studyset):%0A    storage_path = storage._get_study_set_storage_path()%0A    studyset_path = os.path.join(storage_path, studyset)%0A    print studyset_path%0A%0A%0Asets_group.add_command(new)%0Asets_group.add_command(select
 )%0A

Add sets select command.