From 61ed3ee721d9b7cdce0892c006f3a2940b72eb9f Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Thu, 9 Apr 2020 19:46:10 +0200 Subject: [PATCH] Added Outline enums and column labels to constants submodule --- nw/constants/__init__.py | 3 ++- nw/constants/constants.py | 20 +++++++++++++++++++- nw/constants/enum.py | 21 +++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/nw/constants/__init__.py b/nw/constants/__init__.py index 769c50d5..eeab86cc 100644 --- a/nw/constants/__init__.py +++ b/nw/constants/__init__.py @@ -4,7 +4,7 @@ from nw.constants.constants import ( nwConst, nwFiles, nwKeyWords, nwLabels, nwDependencies, nwQuotes, nwUnicode ) from nw.constants.enum import ( - nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType + nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline ) __all__ = [ @@ -22,4 +22,5 @@ __all__ = [ "nwItemClass", "nwItemLayout", "nwItemType", + "nwOutline", ] diff --git a/nw/constants/constants.py b/nw/constants/constants.py index b39830bc..9e9adefc 100644 --- a/nw/constants/constants.py +++ b/nw/constants/constants.py @@ -10,7 +10,7 @@ """ -from nw.constants.enum import nwItemClass, nwItemLayout +from nw.constants.enum import nwItemClass, nwItemLayout, nwOutline class nwConst(): @@ -104,6 +104,24 @@ class nwLabels(): nwKeyWords.ENTITY_KEY : "Entities", nwKeyWords.CUSTOM_KEY : "Custom", } + OUTLINE_COLS = { + nwOutline.TITLE : "Title", + nwOutline.LEVEL : "Level", + nwOutline.LABEL : "Document", + nwOutline.LINE : "Line", + nwOutline.CCOUNT : "Chars", + nwOutline.WCOUNT : "Words", + nwOutline.PCOUNT : "Pars", + nwOutline.POV : "POV", + nwOutline.CHAR : KEY_NAME[nwKeyWords.CHAR_KEY], + nwOutline.PLOT : KEY_NAME[nwKeyWords.PLOT_KEY], + nwOutline.TIME : KEY_NAME[nwKeyWords.TIME_KEY], + nwOutline.WORLD : KEY_NAME[nwKeyWords.WORLD_KEY], + nwOutline.OBJECT : KEY_NAME[nwKeyWords.OBJECT_KEY], + nwOutline.ENTITY : KEY_NAME[nwKeyWords.ENTITY_KEY], + nwOutline.CUSTOM : KEY_NAME[nwKeyWords.CUSTOM_KEY], + nwOutline.SYNOP : "Synopsis", + } # END Class nwLabels diff --git a/nw/constants/enum.py b/nw/constants/enum.py index 9d47581e..4c484a9a 100644 --- a/nw/constants/enum.py +++ b/nw/constants/enum.py @@ -88,3 +88,24 @@ class nwAlert(Enum): BUG = 3 # END Enum nwAlert + +class nwOutline(Enum): + + TITLE = 0 + LEVEL = 1 + LABEL = 2 + LINE = 3 + CCOUNT = 4 + WCOUNT = 5 + PCOUNT = 6 + POV = 7 + CHAR = 8 + PLOT = 9 + TIME = 10 + WORLD = 11 + OBJECT = 12 + ENTITY = 13 + CUSTOM = 14 + SYNOP = 15 + +# END Enum nwOutline