litle misc
This commit is contained in:
parent
f4fbb825db
commit
17e3fdd342
|
@ -52,7 +52,7 @@ markers_opt = (
|
|||
def post_IDs(file_post):
|
||||
# Check if argument's file (.tyto) or exit
|
||||
if not file_post:
|
||||
print(':( Unused argument file')
|
||||
print(':< Unused argument file')
|
||||
sys.exit(1)
|
||||
|
||||
# Set HTML file from file_post
|
||||
|
@ -62,7 +62,7 @@ def post_IDs(file_post):
|
|||
global post_uri
|
||||
post_uri = '%s%s'%(domain.domain_articles, file_post)
|
||||
if not os.path.exists(post_uri):
|
||||
print(':( Unused file: %s'%post_uri)
|
||||
print(':< Unused file: %s'%post_uri)
|
||||
sys.exit(1)
|
||||
|
||||
# From argument file_post
|
||||
|
@ -142,7 +142,7 @@ def create_domain_dirs(path_type):
|
|||
|
||||
# Check/Create needed directories (only for 'check' process)
|
||||
if 'db' in path_type:
|
||||
os.makedirs(domain.domain_db, exist_ok=True)
|
||||
os.makedirs(domain.domain_db, exist_ok=True)
|
||||
os.makedirs(domain.domain_logs, exist_ok=True)
|
||||
|
||||
#=======================#
|
||||
|
@ -187,7 +187,7 @@ def process_article(post_uri, Force):
|
|||
file.close()
|
||||
msg_log = 'Log > Create logs file for %s in %s\n'%(
|
||||
post_uri, post_logs)
|
||||
log.append_f(post_logs,msg_log,0)
|
||||
log.append_f(post_logs, msg_log, 0)
|
||||
|
||||
# Article Database
|
||||
#------------------
|
||||
|
@ -204,7 +204,7 @@ def process_article(post_uri, Force):
|
|||
# Compare chk Hashes.
|
||||
# Pass if Force, and not same
|
||||
if hash_chk == post_chk[0] and not Force:
|
||||
print(':) Check was already done, on', post_chk[1])
|
||||
print(':D Check was already done, on', post_chk[1])
|
||||
sys.exit(0)
|
||||
|
||||
# Processing
|
||||
|
@ -220,7 +220,6 @@ def process_article(post_uri, Force):
|
|||
check_post_header(headers.rsplit('\n'))
|
||||
if Post_Err: sys.exit(1)
|
||||
|
||||
|
||||
# Protect bCodes, keep markers for stats, before checking other markers
|
||||
wip.convert_bcodes(article.rsplit('\n'),
|
||||
'[[', ']]',
|
||||
|
@ -406,13 +405,13 @@ def if_mandat_marker(marker, m_in):
|
|||
|
||||
if not m_in[0]:
|
||||
msg_log = 'Unused needed marker "%s"'%marker
|
||||
log.append_f(post_logs,msg_log,1)
|
||||
log.append_f(post_logs, msg_log, 1)
|
||||
Post_Err = True
|
||||
elif not m_in[2]:
|
||||
msg_log = 'Line %s. Undefined marker "%s"'%(
|
||||
m_in[1], marker
|
||||
)
|
||||
log.append_f(post_logs,msg_log,1)
|
||||
log.append_f(post_logs, msg_log, 1)
|
||||
|
||||
#================================#
|
||||
# Check Date format and validity #
|
||||
|
|
Loading…
Reference in New Issue