[1.9.31] - added empty styles.css in tyto/tpl_files
This commit is contained in:
parent
d7242c6452
commit
fca139bd44
|
@ -10,6 +10,11 @@ Tyto - Littérateur
|
||||||
|
|
||||||
# CURRENTLY IN DEV (in devel branch) !
|
# CURRENTLY IN DEV (in devel branch) !
|
||||||
|
|
||||||
|
## [1.9.31]
|
||||||
|
- Fix replacing markers starting LINE with HTML
|
||||||
|
- Added tpl_files directory
|
||||||
|
- - addes styles.css (empty with classes used)
|
||||||
|
|
||||||
## [1.9.30]
|
## [1.9.30]
|
||||||
- 'wip' process
|
- 'wip' process
|
||||||
- - About all markers done !
|
- - About all markers done !
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Package: tyto
|
Package: tyto
|
||||||
Version: 1.9.30
|
Version: 1.9.31
|
||||||
Section: custom
|
Section: custom
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: all
|
Architecture: all
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Version: 1.9.30
|
# Version: 1.9.31
|
||||||
# Updated: 2023-10-18 1697613100
|
# Updated: 2023-10-18 1697613100
|
||||||
# Tyto - Littérateur
|
# Tyto - Littérateur
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -211,33 +211,50 @@ def words_tags():
|
||||||
# anchors, paragraphs... #
|
# anchors, paragraphs... #
|
||||||
#-------------------------#
|
#-------------------------#
|
||||||
def sl_tags():
|
def sl_tags():
|
||||||
for line in html_post.rsplit("\n"):
|
global html_post
|
||||||
|
|
||||||
|
for ln, line in enumerate(html_post.rsplit("\n")):
|
||||||
css = ""
|
css = ""
|
||||||
|
|
||||||
# Paragraphs
|
# Paragraphs
|
||||||
if line.lstrip().startswith(post.ptags[2][0]):
|
if line.lstrip().startswith(post.ptags[2][0]):
|
||||||
css = tools.get_css(line, post.ptags[2][0], "?")
|
css = tools.get_css(line, post.ptags[2][0], "?")
|
||||||
text_replace(line, post.ptags[2][3]%css)
|
html_post = \
|
||||||
|
html_post.replace(
|
||||||
|
html_post.rsplit("\n")[ln],
|
||||||
|
post.ptags[2][3]%css
|
||||||
|
)
|
||||||
elif line.lstrip().startswith(post.ptags[2][1]):
|
elif line.lstrip().startswith(post.ptags[2][1]):
|
||||||
text_replace(line, post.ptags[2][4])
|
text_replace(line, post.ptags[2][4])
|
||||||
|
|
||||||
# DIVs
|
# DIVs
|
||||||
if line.lstrip().startswith(post.ptags[4][0]):
|
if line.lstrip().startswith(post.ptags[4][0]):
|
||||||
css = tools.get_css(line, post.ptags[4][0], "?")
|
css = tools.get_css(line, post.ptags[4][0], "?")
|
||||||
text_replace(line, post.ptags[4][3]%css)
|
html_post = \
|
||||||
|
html_post.replace(
|
||||||
|
html_post.rsplit("\n")[ln],
|
||||||
|
post.ptags[4][3]%css
|
||||||
|
)
|
||||||
elif line.lstrip().startswith(post.ptags[4][1]):
|
elif line.lstrip().startswith(post.ptags[4][1]):
|
||||||
text_replace(line, post.ptags[4][4])
|
text_replace(line, post.ptags[4][4])
|
||||||
|
|
||||||
# <br>
|
# <br>
|
||||||
elif line.lstrip().startswith(post.html_brline[0]):
|
elif line.lstrip().startswith(post.html_brline[0]):
|
||||||
css = tools.get_css(line, post.html_brline[0][0], "?")
|
css = tools.get_css(line, post.html_brline[0][0], "?")
|
||||||
text_replace(line, post.html_brline[1]%css)
|
html_post = \
|
||||||
|
html_post.replace(
|
||||||
|
html_post.rsplit("\n")[ln],
|
||||||
|
post.html_brline[1]%css
|
||||||
|
)
|
||||||
|
|
||||||
# <hr>
|
# <hr>
|
||||||
elif line.lstrip().startswith(post.html_hrline[0]):
|
elif line.lstrip().startswith(post.html_hrline[0]):
|
||||||
css = tools.get_css(line, post.html_hrline[0][0], "?")
|
css = tools.get_css(line, post.html_hrline[0][0], "?")
|
||||||
text_replace(line, post.html_hrline[1]%css)
|
html_post = \
|
||||||
|
html_post.replace(
|
||||||
|
html_post.rsplit("\n")[ln],
|
||||||
|
post.html_hrline[1]%css
|
||||||
|
)
|
||||||
|
|
||||||
# Anchors
|
# Anchors
|
||||||
elif line.lstrip().startswith(post.anchor_target[0]):
|
elif line.lstrip().startswith(post.anchor_target[0]):
|
||||||
|
@ -245,9 +262,10 @@ def sl_tags():
|
||||||
text_replace(line, post.anchor_target[1]%css)
|
text_replace(line, post.anchor_target[1]%css)
|
||||||
|
|
||||||
|
|
||||||
#
|
#========================================#
|
||||||
#
|
# From data, split number and string #
|
||||||
#
|
# return new value with px if not string #
|
||||||
|
#----------------------------------------#
|
||||||
def split_size(size):
|
def split_size(size):
|
||||||
tup_size= (
|
tup_size= (
|
||||||
''.join(filter(str.isdigit, size)) or "",
|
''.join(filter(str.isdigit, size)) or "",
|
||||||
|
@ -298,7 +316,6 @@ def images():
|
||||||
try:
|
try:
|
||||||
width = option.rsplit("w=")[1]
|
width = option.rsplit("w=")[1]
|
||||||
width = split_size(width)
|
width = split_size(width)
|
||||||
print("wip: size =", width)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -306,7 +323,6 @@ def images():
|
||||||
try:
|
try:
|
||||||
height = option.rsplit("h=")[1]
|
height = option.rsplit("h=")[1]
|
||||||
height = split_size(height)
|
height = split_size(height)
|
||||||
print("wip: size =", height)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -579,17 +595,3 @@ def convert_list(markdown_str, mark_b, mark_c):
|
||||||
work_str += " "*(cur_rank-i-1) + CLOSING[rank_stack.pop()]
|
work_str += " "*(cur_rank-i-1) + CLOSING[rank_stack.pop()]
|
||||||
|
|
||||||
return work_str
|
return work_str
|
||||||
|
|
||||||
|
|
||||||
"""
|
|
||||||
#
|
|
||||||
# Not Yet done, soon...
|
|
||||||
#
|
|
||||||
def paragraphs():
|
|
||||||
# Paragraph is set
|
|
||||||
if line.startswith(post.ptags[2][0]):
|
|
||||||
p_css = tools.get_css(line, post.ptags[2][0])
|
|
||||||
html_quote = "%s\n%s"%(html_quote, post.ptags[2][3]%p_css)
|
|
||||||
elif line.startswith(post.ptags[2][1]):
|
|
||||||
html_quote = "%s\n%s"%(html_quote, post.ptags[2][4])
|
|
||||||
"""
|
|
||||||
|
|
Loading…
Reference in New Issue