check: add _brut:NAME check from content in headers
This commit is contained in:
parent
0378edcdf4
commit
c1bf6c6b15
|
@ -529,10 +529,16 @@ def check_content(post_bottom):
|
||||||
# Check for _image:NAME from content in header
|
# Check for _image:NAME from content in header
|
||||||
#---------------------------------------------
|
#---------------------------------------------
|
||||||
for ln, line in enumerate(post_bottom):
|
for ln, line in enumerate(post_bottom):
|
||||||
if line.startswith(content_tags):
|
for tag in tyto.content_tags:
|
||||||
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
htag_found = False
|
||||||
if not re.search(r'^' + tag + '\s|' + tag_id, article_header):
|
if line.startswith(tag):
|
||||||
tyto.exiting("10", "%s %s"%(tag, tag_id), True)
|
tag_id = line.rsplit(':', 1)[1].rsplit(' ')[0]
|
||||||
|
htag = tag[1: len(tag)]
|
||||||
|
|
||||||
|
if not re.search(r'%s\s+\b%s\b|%s\b%s\b'%(
|
||||||
|
htag, tag_id, htag, tag_id
|
||||||
|
), article_header):
|
||||||
|
tyto.exiting("10", "%s %s"%(htag, tag_id), True)
|
||||||
|
|
||||||
|
|
||||||
#===============================================#
|
#===============================================#
|
||||||
|
|
|
@ -153,6 +153,9 @@ quote_tags = [
|
||||||
('_lang:', 'lang')
|
('_lang:', 'lang')
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Tags to check for header in content
|
||||||
|
content_tags = ("_image:", '_brut:')
|
||||||
|
|
||||||
|
|
||||||
#=======#
|
#=======#
|
||||||
# TOOLS #
|
# TOOLS #
|
||||||
|
|
Loading…
Reference in New Issue