check: stats for links in article ; need more investigating for others
This commit is contained in:
parent
623540a92a
commit
413b6d2912
|
@ -520,6 +520,7 @@ def check_links(line, ln, stats_links_uniq):
|
||||||
log.append_f(post_logs,msg_log,1)
|
log.append_f(post_logs,msg_log,1)
|
||||||
Post_Err = True
|
Post_Err = True
|
||||||
|
|
||||||
|
|
||||||
if Post_Err: return
|
if Post_Err: return
|
||||||
# Set final marker_N
|
# Set final marker_N
|
||||||
link = (
|
link = (
|
||||||
|
@ -530,7 +531,7 @@ def check_links(line, ln, stats_links_uniq):
|
||||||
globals()[link_nbr] = link
|
globals()[link_nbr] = link
|
||||||
|
|
||||||
# Stats: count occurence
|
# Stats: count occurence
|
||||||
stats_links_p = stats_counter(link_page)
|
stats_links_p = stats_links_p + stats_counter(link_page)
|
||||||
|
|
||||||
#=================================#
|
#=================================#
|
||||||
# Check every marker "file:" #
|
# Check every marker "file:" #
|
||||||
|
|
|
@ -94,12 +94,12 @@ def manage_wip(file_post, Force):
|
||||||
wip_begin_markers(wip_html.rsplit('\n'))
|
wip_begin_markers(wip_html.rsplit('\n'))
|
||||||
wip_titles( wip_html.rsplit('\n'))
|
wip_titles( wip_html.rsplit('\n'))
|
||||||
wip_words_markers(wip_html)
|
wip_words_markers(wip_html)
|
||||||
wip_anchors( wip_html)
|
if anchors > 0: wip_anchors( wip_html)
|
||||||
wip_abbrs( wip_html)
|
if abbrs_u > 0: wip_abbrs( wip_html)
|
||||||
|
|
||||||
# After all, convert protected contents
|
# After all, convert protected contents
|
||||||
wip_links( wip_html)
|
if links_u > 0: wip_links( wip_html)
|
||||||
wip_quotes( wip_html.rsplit('\n'))
|
if quotes > 0: wip_quotes( wip_html.rsplit('\n'))
|
||||||
|
|
||||||
print('> Article HTML:')
|
print('> Article HTML:')
|
||||||
print(wip_html)
|
print(wip_html)
|
||||||
|
@ -132,7 +132,7 @@ def wip_begin_markers(wip_lines):
|
||||||
for line in wip_lines:
|
for line in wip_lines:
|
||||||
if len(line) == 0: continue
|
if len(line) == 0: continue
|
||||||
|
|
||||||
# Find if line hase marker and remplace
|
# Find if line has marker and remplace
|
||||||
for marker in marks_html:
|
for marker in marks_html:
|
||||||
if re.match(marker[0], line):
|
if re.match(marker[0], line):
|
||||||
if marker[2]: # Has CSS
|
if marker[2]: # Has CSS
|
||||||
|
@ -220,7 +220,7 @@ def wip_anchors(article):
|
||||||
# Convert links to HTML #
|
# Convert links to HTML #
|
||||||
# Each are converted to Base64 #
|
# Each are converted to Base64 #
|
||||||
#------------------------------#
|
#------------------------------#
|
||||||
def wip_links(article):
|
def wip_links(article):
|
||||||
global wip_html
|
global wip_html
|
||||||
|
|
||||||
link_fmt = '<a class="%s" href="%s" title="%s">%s</a>'
|
link_fmt = '<a class="%s" href="%s" title="%s">%s</a>'
|
||||||
|
|
Loading…
Reference in New Issue