Commit 36a7e4c9 authored by erreur401's avatar erreur401

add folder rsync to parser

parent d1a5b601
......@@ -23,11 +23,13 @@ for file in inputMd:
yamlData = yaml.load(str(input.partition('...')[2].partition('...')[0]))
if yamlData['folderImg']:
folderName = yamlData['folderImg']
outputMd = re.sub(r'(?:!\[(.*)\]\()(.*)(\/)(.*)(?:\))', r'![\1](/static/%s/\4)'%(folderName), input )
# rsync local image folders to app/static ?
os.system('rsync media/%s ../static/img/' , %(folderName) )
outputMd = re.sub(r'(?:!\[(.*)\]\()(.*)(\/)(.*)(?:\))', r'![\1](/static/img/%s/\4)'%(folderName), input )
outputMd = re.sub(r'(\.\.\.)\n','', outputMd )
# rsync local image folders to app/static ?
print('.md files _PARSED_ to pages folder')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment