From 59c4a2beb404787fca01d99a8efa82a9a2d50d62 Mon Sep 17 00:00:00 2001 From: Chrys Date: Mon, 26 Aug 2019 18:54:31 +0200 Subject: [PATCH] fix sorting of emotjies --- .../core/punctuationData.py | 45 ++----------------- .../core/punctuationManager.py | 2 +- 2 files changed, 4 insertions(+), 43 deletions(-) diff --git a/src/fenrirscreenreader/core/punctuationData.py b/src/fenrirscreenreader/core/punctuationData.py index 2d55c951..6858e02c 100644 --- a/src/fenrirscreenreader/core/punctuationData.py +++ b/src/fenrirscreenreader/core/punctuationData.py @@ -6,6 +6,7 @@ from fenrirscreenreader.core import debug import string +from collections import OrderedDict punctuationData = { 'LEVELDICT':{ @@ -15,47 +16,7 @@ punctuationData = { 'all': string.punctuation + ' ยง', }, 'PUNCTDICT':{ - ' ':'space', - '&':'and', - "'":"apostrophe", - '@':'at', - '\\':'backslash', - '|':'bar', - '!':'bang', - '^':'carrot', - ':':'colon', - ',':'comma', - '-':'dash', - '$':'dollar', - '.':'dot', - '>':'greater', - '`':'grave', - '#':'hash', - '{':'left brace', - '[':'left bracket', - '(':'left paren', - '<':'less', - '%':'percent', - '+':'plus', - '?':'question', - '"':'quote', - ')':'right paren', - '}':'right brace', - ']':'right bracket', - ';':'semicolon', - '/':'slash', - '*':'star', - '~':'tilde', - '_':'line', - '=':'equals', }, -'CUSTOMDICT':{ - }, -'EMOTICONDICT':{ - ':)':'smiley', - ';)':'winking face', - 'XD':'loool', - ':@':'angry face', - ':D':'lought' - }, +'CUSTOMDICT':OrderedDict(), +'EMOTICONDICT':OrderedDict(), } diff --git a/src/fenrirscreenreader/core/punctuationManager.py b/src/fenrirscreenreader/core/punctuationManager.py index d665141f..a98577ea 100644 --- a/src/fenrirscreenreader/core/punctuationManager.py +++ b/src/fenrirscreenreader/core/punctuationManager.py @@ -114,4 +114,4 @@ class punctuationManager(): sepLine[1] = ':===:' self.env['punctuation'][currDictName][sepLine[0]] = sepLine[1] self.env['runtime']['debug'].writeDebugOut("Punctuation: " + currDictName + '.' + str(sepLine[0]) + ' :' + sepLine[1] ,debug.debugLevel.INFO, onAnyLevel=True) - dictConfig.close() + dictConfig.close()