indev publish. fix link src image HTML
This commit is contained in:
parent
153417aa22
commit
4d604acb91
|
@ -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):
|
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():
|
def replace_line_pub():
|
||||||
|
|
|
@ -295,8 +295,11 @@ def wip_images():
|
||||||
for value in values:
|
for value in values:
|
||||||
if 't=' in value:
|
if 't=' in value:
|
||||||
target = value.rsplit('=',1)[1]
|
target = value.rsplit('=',1)[1]
|
||||||
if target == "+": image_target = eval(image)[1]
|
if target == "+":
|
||||||
else: image_target = target
|
image_target = eval(image)[1]
|
||||||
|
image_target = sub_uri + image_target[1:]
|
||||||
|
else:
|
||||||
|
image_target = target
|
||||||
|
|
||||||
if 'c=' in value:
|
if 'c=' in value:
|
||||||
set_css = value.rsplit('=', 1)[1]
|
set_css = value.rsplit('=', 1)[1]
|
||||||
|
@ -317,8 +320,10 @@ def wip_images():
|
||||||
style = ''
|
style = ''
|
||||||
|
|
||||||
# set <img /> from parameter
|
# set <img /> from parameter
|
||||||
|
image_target = eval(image)[1]
|
||||||
|
image_target = sub_uri + image_target[1:]
|
||||||
image_src = image_show%(
|
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
|
# Set link for image
|
||||||
|
|
Loading…
Reference in New Issue