diff --git a/src/var/lib/tyto/program/check.py b/src/var/lib/tyto/program/check.py index 9eb1535..d7cfdee 100644 --- a/src/var/lib/tyto/program/check.py +++ b/src/var/lib/tyto/program/check.py @@ -620,7 +620,7 @@ def create_database(): if stat_abbrs > 0: for i in range(1, stat_abbrs + 1): - database = '%sabbr_%s = %s'%( + database = '%s\nabbr_%s = %s'%( database, i, globals()['abbr_%s'%i] ) diff --git a/src/var/lib/tyto/program/wip.py b/src/var/lib/tyto/program/wip.py index e0c2928..c84f16a 100644 --- a/src/var/lib/tyto/program/wip.py +++ b/src/var/lib/tyto/program/wip.py @@ -85,6 +85,7 @@ def wip_article(target): wip_single_tags() # br /, anchors wip_words_tags() # Paragraphs, strongs, italics wip_links() # Links_%i from headers in DB + wip_abbrs() # Convert abbr wip_images() # Images_%i from headers in DB wip_titles() # Convert #N, remove empty line, add divs wip_quotes() # Quotes. Decode base64 Q64 and convert to HTML @@ -202,6 +203,21 @@ def wip_links(): eval(link)[0], eval(link)[1]%('_self') ) + +# +# Convert Abbrs +# +def wip_abbrs(): + if uniq_abbrs == 0: return + + global article_bottom + abbr_html = '%s' + + for i in range(1, uniq_abbrs + 1): + abbr = 'abbr_%s'%i + article_bottom = article_bottom.replace(eval(abbr)[0], eval(abbr)[1]) + + #-------------------------------------# # Get width and height for image # # from parameter c=, from wip_image() #