[1.9.16] - Working on 'check' process and post database
This commit is contained in:
parent
08a4476a5b
commit
1aab0bd8fe
|
@ -305,6 +305,10 @@ def ml_tag_values(ln, tag, stats):
|
||||||
post_error = debug.out(51, tyto_value, post.uri, True, 2, False)
|
post_error = debug.out(51, tyto_value, post.uri, True, 2, False)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# Check value2 link for some tags (file, image...)
|
||||||
|
if tag in post.value2s_uri():
|
||||||
|
if not is_value2_file_exists(ln+2, tag)
|
||||||
|
|
||||||
# Convert values to HTML (put in post database)
|
# Convert values to HTML (put in post database)
|
||||||
html_value = '<a href="%s" class="%s" target="%s" alt="%s">%s</a>'%(
|
html_value = '<a href="%s" class="%s" target="%s" alt="%s">%s</a>'%(
|
||||||
value2, css, "%%s", value3, value1
|
value2, css, "%%s", value3, value1
|
||||||
|
@ -328,6 +332,23 @@ def ml_tag_values(ln, tag, stats):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
#================================#
|
||||||
|
# Check value2 uri for some tags #
|
||||||
|
#--------------------------------#
|
||||||
|
def is_value2_file_exists(ln, tag):
|
||||||
|
# check first char if "@" to check file in generic folders
|
||||||
|
print("post: value2", ln, value2)
|
||||||
|
|
||||||
|
# Set defaut directory for files in /files
|
||||||
|
wrk_df = domain.wrk_file
|
||||||
|
|
||||||
|
# Set directory for images in /images
|
||||||
|
if tag == post.ml_tags[1]: # image:
|
||||||
|
wrk_df = domain.wrk_images
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
#=====================#
|
#=====================#
|
||||||
# check text contents #========================================================
|
# check text contents #========================================================
|
||||||
#=====================#
|
#=====================#
|
||||||
|
|
|
@ -179,6 +179,8 @@ ml_marks = {
|
||||||
"abbr:" : "::"
|
"abbr:" : "::"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Markers with uri in value2
|
||||||
|
value2s_uri = (ml_tags[1], ml_tags[2], ml_tags[3])
|
||||||
|
|
||||||
# text_contents
|
# text_contents
|
||||||
# =============
|
# =============
|
||||||
|
|
Loading…
Reference in New Issue