X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/0604bdd5f693da9f1c78f9d9fa2276f0c7b6c17b..23d025c8875cca1404f274aca7170c9db5e980e7:/src/librarian/builders/__init__.py?ds=inline diff --git a/src/librarian/builders/__init__.py b/src/librarian/builders/__init__.py index fcd9194..85f8427 100644 --- a/src/librarian/builders/__init__.py +++ b/src/librarian/builders/__init__.py @@ -1,14 +1,28 @@ +# This file is part of Librarian, licensed under GNU Affero GPLv3 or later. +# Copyright © Fundacja Wolne Lektury. See NOTICE for more information. +# +from collections import OrderedDict from .txt import TxtBuilder -from .html import HtmlBuilder +from .html import HtmlBuilder, SnippetHtmlBuilder, StandaloneHtmlBuilder, DaisyHtmlBuilder from .sanitize import Sanitizer +from .daisy import DaisyBuilder +from .epub import EpubBuilder +from .mobi import MobiBuilder +from .pdf import PdfBuilder +from .fb2 import FB2Builder -builders = [ - TxtBuilder, - HtmlBuilder, - Sanitizer, -] +builders = OrderedDict([ + ("txt", TxtBuilder), + ("html", HtmlBuilder), + ("html-snippet", SnippetHtmlBuilder), + ("html-standalone", StandaloneHtmlBuilder), + ("html-daisy", DaisyHtmlBuilder), + ("daisy", DaisyBuilder), + ("sanitizer", Sanitizer), - -def get_builder_class(builder_id): - return next(b for b in builders if b.identifier == builder_id) + ("epub", EpubBuilder), + ("mobi", MobiBuilder), + ("pdf", PdfBuilder), + ("fb2", FB2Builder), +])