xpuz.constants
¤
Constant values used across the source code, defining values such as paths and colour values for both the GUI and the web application.
Attributes:
| Name | Type | Description |
|---|---|---|
DIR_PATH |
Path
|
Path to the toplevel of |
TEMPLATE_CFG_PATH |
str
|
Path to template |
DOC_PATH |
str
|
Path to the system's documents directory or equivalent. |
DOC_DATA_PATH |
str
|
Path to the |
DOC_CAT_PATH |
str
|
Path to the |
DOC_CFG_PATH |
str
|
Path to the |
LOCALES_PATH |
str
|
Path to the package's locales folder. |
BASE_POT_PATH |
str
|
Path to the package's translation template file. |
ASSETS_PATH |
str
|
Path to the package's |
IMAGES_PATH |
str
|
Path to the package's |
BASE_CWORDS_PATH |
str
|
Path to the package's base crosswords folder. |
ATTEMPTS_DB_PATH |
str
|
Path to the |
DIFFICULTIES |
List[str]
|
Crossword difficulties. |
ACROSS |
str
|
Representation of a word going right to left. |
DOWN |
str
|
Representation of a word going top to bottom. |
EMPTY |
str
|
Representation of a void cell in the crossword grid. |
NONLANGUAGE_PATTERN |
Pattern
|
Regex pattern to filter out non-language characters. |
QUALITY_MAP |
Dict[str, float]
|
Mapping of crossword quality descriptors to a float value, which is used to scale how many optimisation attempts are undergone to make a crossword with that quality. |
WHITESPACE_SCALAR |
float
|
A value to scale the whitespace present in a crossword grid. |
DIMENSIONS_CONSTANT |
int
|
A value that is added to the final grid dimension
calculation after applying |
PDF_WIDTH |
int
|
PDF A4 width. |
PDF_HEIGHT |
int
|
PDF A4 height. |
PDF_MARGIN |
int
|
PDF A4 margin. |
FONTSIZE_DIR_TITLE |
int
|
Font size of the title for the 'Across' or 'Down' columns in a PDF. |
FONTSIZE_DEF |
int
|
Clue font size. |
PAGE_DEF_MAX |
int
|
How many clues can fit on a page. |
DIM |
Tuple[int, int]
|
Standard tkinter GUI dimensions |
EDITOR_DIM |
Tuple[int, int]
|
Dimensions for the crossword editor within the tkinter GUI. |
LANG_REPLACEMENTS |
Dict[str, Union[str, None]]
|
Mapping of google translate language codes to their
respective |