diff --git a/src/var/lib/tyto/program/check.py b/src/var/lib/tyto/program/check.py index a8164c6..2783c30 100644 --- a/src/var/lib/tyto/program/check.py +++ b/src/var/lib/tyto/program/check.py @@ -1224,9 +1224,9 @@ def create_DB(post_db): 'post_tmp = "%s"'%post_tmp, 'post_url = "%s"'%post_url, '\n# Article Status', - 'post_chk = ("%s","%s")'%(hash_chk,time_chk), - 'post_wip = ("%s","%s")'%(hash_wip,time_wip), - 'post_www = ("%s","%s")'%(hash_www,time_www), + 'post_chk = (\'%s\', \'%s\')'%(hash_chk,time_chk), + 'post_wip = (\'%s\', \'%s\')'%(hash_wip,time_wip), + 'post_www = (\'%s\', \'%s\')'%(hash_www,time_www), '\n# Mandatory Headers', 'post_title = "%s"'%title[2], 'post_about = "%s"'%about[2], diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index cc76e05..c58ba28 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -133,11 +133,18 @@ def manage_wip(file_post, Force): time_wip = log.nowdate() 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) + rep_post_wip = 'post_wip = (\'%s\', \'%s\')'%( + check.post_wip[0], check.post_wip[1]) + tmp_post_wip = (hash_wip, time_wip) post_wip = 'post_wip = %s'%str(tmp_post_wip) print(rep_post_wip, '>>', post_wip) + with open(check.post_db, 'r') as file: + filedata = file.read() + filedata = filedata.replace(rep_post_wip, post_wip) + with open(check.post_db, 'w') as file: + file.write(filedata) + #============================# # HTML CONVERTERS #