[sync] + pages support

This commit is contained in:
tmshv committed 2016-11-11 21:28:00 +03:00
1 parent 59cbcc7886
commit 714ceb2ac8
6 files changed
+178 -2

No files matched your search

+10
View File
@@ -93,6 +93,16 @@ def images_from_html(md):
return images
def title_from_html(md):
if not md:
return None
doc = lxml.html.fromstring(md)
ts = doc.cssselect('h1')
if len(ts):
return ts[0].text
create_post_from_image_list = lambda images: markdown(
'\n'.join(map(
lambda i: '![]({img})'.format(img=i),