Feat: import work and verify compilation

This commit is contained in:
2020-06-24 08:26:04 +02:00
parent 1ad81faabe
commit 5b475a2f38
1607 changed files with 151664 additions and 1255 deletions

View File

@@ -44,7 +44,7 @@ def process_content(article):
soup = BeautifulSoup(article._content,'lxml')
except FeatureNotFound:
soup = BeautifulSoup(article._content,'html.parser')
for img in soup.find_all('img',src=FORMAT_RE):
src = re.sub(article.settings['INTRASITE_LINK_REGEX'],'',img['src'].strip())
if src.startswith(('http://','https://','ftp://')): continue
@@ -70,10 +70,10 @@ def process_content(article):
png_url = '/'.join((siteurl, preview_dir, linked_content.url + '.png'))
png_url = png_url.replace('\\', '/')
img['src'] = png_url
article._content = unicode(soup)
def get_pdf_imgs(generators):
# Process the articles and pages
for generator in generators:
@@ -83,7 +83,7 @@ def get_pdf_imgs(generators):
elif isinstance(generator, PagesGenerator):
for page in generator.pages:
process_content(page)
def convert_pdfs(pelican):
"""