#!/usr/bin/python3 # # yelp-build # Copyright (C) 2010-2020 Shaun McCance # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. import configparser import os import sys import shutil import subprocess import tempfile import urllib.parse import uuid import lxml.etree import lxml.ElementInclude XSL_DB2HTML = '/usr/share/yelp-xsl/xslt/docbook/html/db2html.xsl' XSL_DB2XHTML = '/usr/share/yelp-xsl/xslt/docbook/html/db2xhtml.xsl' XSL_MALCACHE = '/usr/share/yelp-xsl/xslt/mallard/cache/mal-cache.xsl' XSL_MAL2HTML = '/usr/share/yelp-xsl/xslt/mallard/html/mal2html.xsl' XSL_MAL2XHTML = '/usr/share/yelp-xsl/xslt/mallard/html/mal2xhtml.xsl' XSL_MAL_OPF='/usr/share/yelp-tools/xslt/mal-opf.xsl' XSL_MAL_NCX='/usr/share/yelp-tools/xslt/mal-ncx.xsl' YELP_JS_DIR = '/usr/share/yelp-xsl/js' XSLCOMMON = (''' {includes} C