wip: get page from html module

This commit is contained in:
Cyrille L 2022-11-25 11:31:13 +01:00
parent 4a5a741c2c
commit a457c78610
2 changed files with 11 additions and 9 deletions

View File

@ -19,6 +19,7 @@
import re, os
import check, log, domain
page = ''
Tyto = 'Tyto - Littérateur'
tytogen = 'https://git.a-lec.org/echolib/tyto-litterateur'
tytourl = 'https://tyto.echolib.re'
@ -61,7 +62,7 @@ def translations():
# includes wip.html #
#------------------------#
def html_main_page(wip_html):
global post_date
global post_date, page
# Source DB variables
post_db = exec(open(check.curr_post_db).read(),globals())
@ -342,5 +343,4 @@ def html_main_page(wip_html):
msg_log = 'Use default footer in page. Unused file: %s'%files_tpl[2][0]
log.append_f(check.post_logs, msg_log, 0)
print(page)
#print(page)

View File

@ -110,8 +110,6 @@ def manage_wip(file_post, Force):
# Get Legacy contents from base64 markers
convert_all_b64(wip_html.rsplit('\n'))
#print('> Article HTML:')
#print(wip_html)
#print('> Article with Tabs:')
tab_article(wip_html.rsplit('\n'))
@ -119,6 +117,10 @@ def manage_wip(file_post, Force):
# Create full page
html.html_main_page(wip_html.rsplit('\n'))
wip_html = html.page
print('> Article HTML:')
print(wip_html)
#============================#
# HTML CONVERTERS #
@ -137,10 +139,10 @@ def wip_begin_markers(wip_lines):
wip_tmp = ''
# Set marker (regex to find), HTML, Need CSS
marks_html = [
['^\|$|^\|\s' , '<br class="%s">' , True ],
['^>>\s' , '<a id="%s"></a>' , True ],
[r'^\($|\(\s' , '<p class="%s">' , True ],
['^\)$|^\)\s' , '</p>' , False],
['^\|$|^\|\s' , '<br class="%s">' , True ],
['^>>\s' , '<a id="%s"></a>' , True ],
[r'^\($|\(\s' , '<p class="%s">' , True ],
['^\)$|^\)\s' , '</p>' , False],
['^\[\[$|^\[\[\s' , '<pre class="%s"' , True ],
['^\]\]$|^\]\]\s' , '</pre>' , False]
]