check: fix global post_url
This commit is contained in:
parent
6c0486cd0a
commit
9b24821e47
|
@ -67,6 +67,9 @@ def post_IDs(file_post):
|
||||||
file_html = file_post.replace('.tyto','.html')
|
file_html = file_post.replace('.tyto','.html')
|
||||||
if file_html.endswith('index.html'):
|
if file_html.endswith('index.html'):
|
||||||
file_html = file_html.remplace('index.html', '')
|
file_html = file_html.remplace('index.html', '')
|
||||||
|
|
||||||
|
# Complete URL post file
|
||||||
|
global post_url
|
||||||
post_url = '%s%s/%s'%(
|
post_url = '%s%s/%s'%(
|
||||||
domain.domain_protocol, domain.domain_name, file_html
|
domain.domain_protocol, domain.domain_name, file_html
|
||||||
)
|
)
|
||||||
|
@ -88,11 +91,11 @@ def post_IDs(file_post):
|
||||||
|
|
||||||
# Get Hash from article's content
|
# Get Hash from article's content
|
||||||
global hash_chk
|
global hash_chk
|
||||||
hash_chk = get_filesum(post_uri,True)
|
hash_chk = get_filesum(post_uri, True)
|
||||||
|
|
||||||
# Get Hash ID from URI
|
# Get Hash ID from URI
|
||||||
global curr_post_ID, curr_post_db, post_logs
|
global curr_post_ID, curr_post_db, post_logs
|
||||||
curr_post_ID = get_filesum(post_uri,False)
|
curr_post_ID = get_filesum(post_uri, False)
|
||||||
|
|
||||||
# Set database file for this article
|
# Set database file for this article
|
||||||
curr_post_db = '%s%s.conf'%(domain.domain_db, curr_post_ID)
|
curr_post_db = '%s%s.conf'%(domain.domain_db, curr_post_ID)
|
||||||
|
|
|
@ -129,10 +129,15 @@ def manage_wip(file_post, Force):
|
||||||
page_file.write(wip_html)
|
page_file.write(wip_html)
|
||||||
page_file.close()
|
page_file.close()
|
||||||
|
|
||||||
|
post_uri = '%s%s'%(domain.domain_articles, file_post)
|
||||||
time_wip = log.nowdate()
|
time_wip = log.nowdate()
|
||||||
print("T",time_wip)
|
hash_wip = check.get_filesum(post_uri, True)
|
||||||
|
|
||||||
|
|
||||||
|
rep_post_wip = 'post_wip = %s'%str(check.post_wip)
|
||||||
|
tmp_post_wip = ('"%s"'%hash_wip, '"%s"'%time_wip)
|
||||||
|
post_wip = 'post_wip = %s'%str(tmp_post_wip)
|
||||||
|
print(rep_post_wip, '>>', post_wip)
|
||||||
|
|
||||||
|
|
||||||
#============================#
|
#============================#
|
||||||
# HTML CONVERTERS #
|
# HTML CONVERTERS #
|
||||||
|
|
Loading…
Reference in New Issue