This repository has been archived on 2026-04-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BookConverter/src/livecarta_config.py
2022-04-28 16:26:49 +03:00

65 lines
2.1 KiB
Python

class LiveCartaConfig:
"""Class of values that LiveCarta platform using and supports"""
SUPPORTED_LEVELS = 5
SUPPORTED_HEADERS = {"h1", "h2", "h3", "h4", "h5"}
HEADERS_LEVELS = {"h1", "h2", "h3", "h4", "h5", "h6", "h7", "h8", "h9"}
# Main constant values
DEFAULT_FONT_NAME = 'Times New Roman'
DEFAULT_ALIGN_STYLE = 'left'
ALIGN_STYLES = ['justify', 'right', 'center', 'left']
WORD_DEFAULT_FONT_SIZE = 11
LIVECARTA_DEFAULT_FONT_SIZE = 18
FONT_CONVERT_RATIO = LIVECARTA_DEFAULT_FONT_SIZE / WORD_DEFAULT_FONT_SIZE
font_correspondence_table = {
"Arial": "arial,helvetica,sans-serif",
"Comic Sans MS": "comic sans ms,cursive",
"Courier New": "courier new,courier,monospace",
"Georgia": "georgia,serif",
"Lucida Sans Unicode": "lucida sans unicode,lucida grande,sans-serif",
"Tahoma": "tahoma,geneva,sans-serif",
"Times New Roman": "times new roman,times,serif",
"Trebuchet MS": "trebuchet ms,helvetica,sans-serif",
"Verdana": "verdana,geneva,sans-serif",
"monospace": "courier new,courier,monospace",
"sans-serif": "arial,helvetica,sans-serif"
}
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'