wip: Added module to convert inline-codes
This commit is contained in:
parent
45c915e421
commit
2d1ccc1ec8
|
@ -89,6 +89,9 @@ def wip_article(target):
|
||||||
|
|
||||||
# Quotes
|
# Quotes
|
||||||
wip_quotes() # Decode B64 and convert
|
wip_quotes() # Decode B64 and convert
|
||||||
|
|
||||||
|
# inline_codes
|
||||||
|
wip_icodes()
|
||||||
|
|
||||||
print(article_bottom)
|
print(article_bottom)
|
||||||
|
|
||||||
|
@ -286,9 +289,9 @@ def quote_params(qline):
|
||||||
globals()[tag[1]] = qline.rsplit(' ',1)[1].lstrip()
|
globals()[tag[1]] = qline.rsplit(' ',1)[1].lstrip()
|
||||||
return(True)
|
return(True)
|
||||||
|
|
||||||
#
|
#==========================#
|
||||||
# INDEV: convert quote in article
|
# Convert quote in article #
|
||||||
#
|
#--------------------------#
|
||||||
def wip_quotes() :
|
def wip_quotes() :
|
||||||
global article_bottom
|
global article_bottom
|
||||||
global author, link, lang, book, date
|
global author, link, lang, book, date
|
||||||
|
@ -417,4 +420,15 @@ def wip_quotes() :
|
||||||
article_bottom = article_bottom.replace(
|
article_bottom = article_bottom.replace(
|
||||||
'Q64.%s.Q64'%line, quote_html
|
'Q64.%s.Q64'%line, quote_html
|
||||||
)
|
)
|
||||||
|
|
||||||
|
#==========================#
|
||||||
|
# Convert all inline-codes #
|
||||||
|
#--------------------------#
|
||||||
|
def wip_icodes():
|
||||||
|
global article_bottom
|
||||||
|
|
||||||
|
matches = re.findall(r'I64.(.*?).I64', article_bottom)
|
||||||
|
for match in matches:
|
||||||
|
rep_icode = 'I64.' + match + '.I64'
|
||||||
|
src_icode = tyto.b64("Decode", match, 'I64.', '.I64')
|
||||||
|
article_bottom = article_bottom.replace(rep_icode, src_icode)
|
||||||
|
|
Loading…
Reference in New Issue