Exemplo n.º 1
0
def delete_manga():
    '''
        remove event
    '''
    record_id = int(raw_input('ID to been removed: '))
    record = store.find(Manga, Manga.id == record_id)
    if not record.count():
        print 'nothing to remove'
        return
    for i in record.order_by(Manga.id):
        print "%s - %s - status; %s" % (i.id, i.name,\
                i.status)

    conferma = raw_input("(q to abort): ")
    if conferma == "q":
        print 'aborted'
        return
    store.remove(record[0])
    store.commit()
    print 'record removed'
    return
Exemplo n.º 2
0
def delete_chapter():
    '''
        remove event
    '''
    record_id = int(raw_input('ID to been removed: '))
    record = store.find(Chapter, Chapter.id == record_id)
    if not record.count():
        print 'nothing to remove'
        return
    for i in record.order_by(Chapter.id):
        print "%s - %s - status; %s" % (i.id, i.link,\
                i.status)

    conferma = raw_input("(q to abort): ")
    if conferma == "q":
        print 'aborted'
        return
    print 'record removed'
    store.remove(record[0])
    store.commit()
    return