Restructure assets
This commit is contained in:
parent
eef4519c73
commit
3800f43bd1
9 changed files with 11 additions and 9 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -88,6 +88,6 @@ ENV/
|
|||
.ropeproject
|
||||
|
||||
out/
|
||||
md_pdf/assets/cover.html
|
||||
md_pdf/assets/templates/cover.html
|
||||
md_pdf/assets/csl/
|
||||
md_pdf/assets/styles-master/
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
from jinja2 import Template
|
||||
from md_pdf.consts import ASSET_DIR
|
||||
from md_pdf.consts import TEMPLATES_DIR
|
||||
import os
|
||||
import logging
|
||||
|
||||
logger = logging.getLogger(__file__)
|
||||
|
||||
|
||||
COVER_TEMPLATE = os.path.join(ASSET_DIR, 'cover-template.html')
|
||||
OUTPUT_COVER_FILE = os.path.join(ASSET_DIR, 'cover.html')
|
||||
COVER_TEMPLATE = os.path.join(TEMPLATES_DIR, 'cover-template.html')
|
||||
OUTPUT_COVER_FILE = os.path.join(TEMPLATES_DIR, 'cover.html')
|
||||
|
||||
|
||||
def render_cover(config):
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import pdfkit
|
||||
from md_pdf.consts import ASSET_DIR
|
||||
from md_pdf.consts import TEMPLATES_DIR, STATIC_DIR
|
||||
from md_pdf.build.cover import OUTPUT_COVER_FILE
|
||||
import os
|
||||
import logging
|
||||
|
@ -7,9 +7,9 @@ import logging
|
|||
logger = logging.getLogger(__file__)
|
||||
|
||||
|
||||
STYLE_FILE = os.path.join(ASSET_DIR, 'style.css')
|
||||
HEADER_FILE = os.path.join(ASSET_DIR, 'header.html')
|
||||
FOOTER_FILE = os.path.join(ASSET_DIR, 'footer.html')
|
||||
STYLE_FILE = os.path.join(STATIC_DIR, 'style.css')
|
||||
HEADER_FILE = os.path.join(TEMPLATES_DIR, 'header.html')
|
||||
FOOTER_FILE = os.path.join(TEMPLATES_DIR, 'footer.html')
|
||||
PDF_OPTIONS = {
|
||||
"quiet": "",
|
||||
"no-pdf-compression": "",
|
||||
|
|
|
@ -3,8 +3,10 @@ import os
|
|||
PROJECT_DIR = os.path.dirname(__file__)
|
||||
WORKING_DIR = os.getcwd()
|
||||
ASSET_DIR = os.path.join(PROJECT_DIR, 'assets')
|
||||
CSL_DIR = os.path.join(ASSET_DIR, 'csl')
|
||||
|
||||
CSL_DIR = os.path.join(ASSET_DIR, 'csl')
|
||||
TEMPLATES_DIR = os.path.join(ASSET_DIR, 'templates')
|
||||
STATIC_DIR = os.path.join(ASSET_DIR, 'static')
|
||||
|
||||
CONFIG_FILE = os.path.join(WORKING_DIR, 'mdp.yml')
|
||||
|
||||
|
|
Reference in a new issue