Remove not useful consts in livecarta_config.py

This commit is contained in:
Kiryl
2022-09-12 12:54:23 +03:00
parent 4e0d2067d7
commit b7982e7911

View File

@@ -6,71 +6,11 @@ class LiveCartaConfig:
# tag with inline style to be updated with style attribute # tag with inline style to be updated with style attribute
SUPPORTED_LEVELS = 5 SUPPORTED_LEVELS = 5
SUPPORTED_HEADERS = {"h1", "h2", "h3", "h4", "h5"} SUPPORTED_HEADERS = {"h1", "h2", "h3", "h4", "h5"}
HEADERS_LEVELS = {"h1", "h2", "h3",
"h4", "h5", "h6", "h7", "h8", "h9"}
DEFAULT_ALIGN_STYLE = "left"
ALIGN_STYLES = ["justify", "right", "center", "left"]
# Main constant values
DEFAULT_FONT_NAME = "Times New Roman"
WORD_DEFAULT_FONT_SIZE = 11
LIVECARTA_DEFAULT_FONT_SIZE = 18
FONT_CONVERT_RATIO = LIVECARTA_DEFAULT_FONT_SIZE /\
WORD_DEFAULT_FONT_SIZE
COLORS_MAP = {
"#ffff00": "yellow",
"#00ff00": "darkYellow",
"#00ffff": "cyan",
"#ff00ff": "magenta",
"#0000ff": "blue",
"#ff0000": "red",
"#000080": "darkBlue",
"#008080": "darkCyan",
"#008000": "green",
"#800080": "darkMagenta",
"#808000": "darkGreen",
"#c0c0c0": "lightGray",
"#ffffff": "white",
"#800000": "#800000",
"#808080": "#808080"
}
HTML42LIVECARTA_COLORS = {
"yellow": "yellow",
"lime": "green",
"aqua": "cyan",
"fuchsia": "magenta",
"blue": "blue",
"red": "red",
"navy": "darkBlue",
"teal": "darkCyan",
"green": "darkGreen",
"purple": "darkMagenta",
"olive": "darkYellow",
"silver": "lightGray",
"white": "white",
"maroon": "darkRed", # "#800000",
"gray": "darkGray",
"grey": "darkGray",
}
INDENT = "30px"
list_types = ["circle", "disc", "armenian", "decimal", list_types = ["circle", "disc", "armenian", "decimal",
"decimal-leading-zero", "georgian", "lower-alpha", "lower-latin", "decimal-leading-zero", "georgian", "lower-alpha", "lower-latin",
"lower-roman", "upper-alpha", "upper-latin", "upper-roman", "none"] "lower-roman", "upper-alpha", "upper-latin", "upper-roman", "none"]
structural_tags_names = [
"div", "section", "article", "main", "body", "html", "aside",
"canvas", "data", "figure", "footer", "iframe", "span", "p"
]
could_have_style_in_livecarta_regexp = re.compile( could_have_style_in_livecarta_regexp = re.compile(
"(^div$)|(^p$)|(^span$)|(^code$)|(^kbd$)|(^var$)|(^li$)|(^ul$)|(^ol$)|(^td$)|(^th$)|(^h[1-9]$)") "(^div$)|(^p$)|(^span$)|(^code$)|(^kbd$)|(^var$)|(^li$)|(^ul$)|(^ol$)|(^td$)|(^th$)|(^h[1-9]$)")