summaryrefslogtreecommitdiff
path: root/lesana/command.py
blob: cefd457302c927c5231cbfaedc15db672c205fec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import gadona
from . import Collection, Entry


class New(gadona.Command):
    name = 'new'
    arguments = [
        (['--collection', '-c'], dict(
            help='The collection to work on (default .)'
            )),
        ]

    def main(self):
        collection = Collection()
        new_entry = Entry(collection)
        collection.save_entries(new_entry)
        print(new_entry.fname)