move create_post_from_image_list to Article (usage only there)

This commit is contained in:
tmshv committed 2020-02-29 01:02:04 +03:00
1 parent a2a73034da
commit 092fa4578b
2 files changed
+11 -12

No files matched your search

+11 -2
View File
@@ -5,8 +5,8 @@ import os
import kazimir
import settings
from db import collection
from sync import create_date_and_title_from_folder_name, create_post_from_image_list, create_date, \
create_post
from markdown import markdown
from sync import create_date_and_title_from_folder_name, create_date, create_post
from sync.data import list_images
from sync.models import Model
from sync.models.Image import Image
@@ -172,3 +172,12 @@ def read_manifest(provider, path):
return {
**manifest,
}
def create_post_from_image_list(images):
return markdown(
'\n'.join(map(
lambda i: '![]({img})'.format(img=i),
images
))
)