2 # -*- coding: utf-8 -*-
4 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
5 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
7 from __future__ import unicode_literals
9 from librarian.book2anything import Book2Anything, Option
10 from librarian.parser import WLDocument
13 class Book2Txt(Book2Anything):
19 Option('-i', '--ignore-dublin-core', dest='parse_dublincore',
20 action='store_false', default=True,
21 help='don\'t try to parse dublin core metadata')
24 Option('-w', '--wrap', action='store', type='int', dest='wrapping', default=0,
25 help='set line wrap column')
28 Option('-r', '--raw', dest='raw-text',
29 action='store_true', default=False,
30 help='Produce raw text, without any surrounding info.')
32 transform = WLDocument.as_text
35 if __name__ == '__main__':