indev publish. fix link src image HTML

This commit is contained in:
Cyrille L 2023-02-06 11:41:08 +01:00
parent 153417aa22
commit 4d604acb91
2 changed files with 24 additions and 4 deletions

View File

@ -17,8 +17,23 @@
#**********************************************************************
import db, logs, tyto
err_pub = True # Default (do not publish)
#==============================#
# Manage action, get post db #
# check if publish can be done #
#------------------------------#
def manage_publish(target, option):
print('> In manage_publish: t="%s", o="%s"'%(target, option))
db_exists = tyto.get_db_post(target)
# Checking if article can be publish
if not db_exists: logs.out("25", tyto.uri_file, False)
elif not tyto.hash_chk: logs.out("25", tyto.uri_file, False)
elif not tyto.hash_wip: logs.out("30", tyto.uri_file, False)
if err_pub: logs.out("7", '', True)
def replace_line_pub():

View File

@ -295,8 +295,11 @@ def wip_images():
for value in values:
if 't=' in value:
target = value.rsplit('=',1)[1]
if target == "+": image_target = eval(image)[1]
else: image_target = target
if target == "+":
image_target = eval(image)[1]
image_target = sub_uri + image_target[1:]
else:
image_target = target
if 'c=' in value:
set_css = value.rsplit('=', 1)[1]
@ -317,8 +320,10 @@ def wip_images():
style = ''
# set <img /> from parameter
image_target = eval(image)[1]
image_target = sub_uri + image_target[1:]
image_src = image_show%(
set_css, eval(image)[1], eval(image)[2], style
set_css, image_target, eval(image)[2], style
)
# Set link for image