Commit 08e2d6a5 authored by Damien DESPRES's avatar Damien DESPRES
Browse files

Merge branch 'development' into 'master'

Development

See merge request !8
parents fe27f6c3 cda3edbd
Pipeline #14444 passed with stages
in 33 seconds
......@@ -160,13 +160,14 @@ def replaceGhostUrlByMinioUrl(cfg,client,doc):
new_url=minio_read_url+'/'+bucket_name+'/'+file_path
logger.debug('New URL:'+new_url)
doc['content-fr']['feature_image']=new_url
urls = re.findall('src="(https:\/\/ghost[^"]*)', fr_content)
for url in urls:
logger.debug('URL '+url)
pushToMinio(client,bucket_name,url)
newcontent=re.sub('(https:\/\/ghost[^"]*\/images)', minio_read_url+'/'+bucket_name, fr_content)
logger.debug(newcontent)
doc['content-fr']['html']=newcontent
if fr_content is not None:
urls = re.findall('src="(https:\/\/ghost[^"]*)', fr_content)
for url in urls:
logger.debug('URL '+url)
pushToMinio(client,bucket_name,url)
newcontent=re.sub('(https:\/\/ghost[^"]*\/images)', minio_read_url+'/'+bucket_name, fr_content)
logger.debug(newcontent)
doc['content-fr']['html']=newcontent
return doc
def pushToMinio( client,bucket_name,image ):
......
Supports Markdown
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