Commit 74e5ee98 authored by erreur401's avatar erreur401

add rsync and fix parser (again)verified local

parent 36a7e4c9
......@@ -7,7 +7,7 @@ import yaml
import os
from glob import glob
PATH_TO_REPO_HOME = '/home/colm/git/bemaker/eu.bemaker.flask/'
PATH_TO_REPO_HOME = '/home/zvevqx/LAB/work/www/eu.bemaker.flask/'
print('parsing all .md files in md_sources folder')
......@@ -24,8 +24,8 @@ for file in inputMd:
if yamlData['folderImg']:
folderName = yamlData['folderImg']
# 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 )
os.system('rsync -rv media/%s ../static/media/'%(folderName) )
outputMd = re.sub(r'(?:!\[(.*)\]\()(.*)(\/)(.*)(?:\))', r'![\1](/static/media/%s/\4)'%(folderName), input )
outputMd = re.sub(r'(\.\.\.)\n','', outputMd )
outputFile.write(outputMd)
outputFile.close()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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