Finally fix lint
This commit is contained in:
parent
b8137c0505
commit
18f041c07c
4 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,3 @@
|
||||||
from md_pdf.consts import WORKING_DIR
|
|
||||||
from md_pdf.build.md import read_files
|
from md_pdf.build.md import read_files
|
||||||
from md_pdf.build.pandoc import build_document, output_html
|
from md_pdf.build.pandoc import build_document, output_html
|
||||||
from md_pdf.build.cover import render_cover
|
from md_pdf.build.cover import render_cover
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import glob
|
import glob
|
||||||
|
|
||||||
|
|
||||||
def get_files_content(filenames):
|
def get_files_content(filenames):
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
with open(filename) as f:
|
with open(filename) as f:
|
||||||
|
|
|
@ -6,6 +6,7 @@ from md_pdf.consts import PROJECT_DIR, CSL_DIR
|
||||||
|
|
||||||
CSL_FILE = os.path.join(PROJECT_DIR, 'assets', 'harverd.csl')
|
CSL_FILE = os.path.join(PROJECT_DIR, 'assets', 'harverd.csl')
|
||||||
|
|
||||||
|
|
||||||
def fix_references_title(content):
|
def fix_references_title(content):
|
||||||
soup = BeautifulSoup(content, 'html.parser')
|
soup = BeautifulSoup(content, 'html.parser')
|
||||||
reference_element = soup.find('div', class_='references')
|
reference_element = soup.find('div', class_='references')
|
||||||
|
@ -33,7 +34,10 @@ def build_document(files_content, bibliography):
|
||||||
]
|
]
|
||||||
filters.append('pandoc-citeproc')
|
filters.append('pandoc-citeproc')
|
||||||
|
|
||||||
html = pypandoc.convert_text(files_content, 'html', format='md',
|
html = pypandoc.convert_text(
|
||||||
|
files_content,
|
||||||
|
'html',
|
||||||
|
format='md',
|
||||||
extra_args=args,
|
extra_args=args,
|
||||||
filters=filters
|
filters=filters
|
||||||
)
|
)
|
||||||
|
|
|
@ -56,5 +56,3 @@ def validate_config(config):
|
||||||
validate_bibliography
|
validate_bibliography
|
||||||
]:
|
]:
|
||||||
validator(config)
|
validator(config)
|
||||||
|
|
||||||
|
|
||||||
|
|
Reference in a new issue