#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of Librarian, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from librarian.book2anything import Book2Anything, Option import os.path from optparse import OptionParser class Book2Pdf(Book2Anything): format_name = "PDF" ext = "pdf" uses_cover = True uses_provider = True transform_options = [ Option('-t', '--save-tex', dest='save_tex', metavar='FILE', help='path to save the intermediary LaTeX file to'), Option('-x', '--save-texml', dest='save_texml', metavar='FILE', help='path to save the intermediary TeXML file to'), Option('-m', '--morefloats', dest='morefloats', metavar='old/new/none', help='force morefloats in old (<1.0c), new (>=1.0c) or none'), Option('-R', '--resources', dest='resources', metavar='DIR', help='a directory with additional resources'), Option('-D', '--documentclass', dest='documentclass', help='LaTeX document class, defaults to "wl"'), Option('-s', '--customizations', dest='customizations', action='append', help='LaTeX document class options'), Option('-e', '--cover-file', dest='cover_file', metavar='FILE', help='Cover image file'), ] if __name__ == '__main__': Book2Pdf.run()