diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index c17b7b9..f979dec 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -89,6 +89,9 @@ def wip_article(target): # Quotes wip_quotes() # Decode B64 and convert + + # inline_codes + wip_icodes() print(article_bottom) @@ -286,9 +289,9 @@ def quote_params(qline): globals()[tag[1]] = qline.rsplit(' ',1)[1].lstrip() return(True) -# -# INDEV: convert quote in article -# +#==========================# +# Convert quote in article # +#--------------------------# def wip_quotes() : global article_bottom global author, link, lang, book, date @@ -417,4 +420,15 @@ def wip_quotes() : article_bottom = article_bottom.replace( '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)