From 729fb5d6b7e2dd3b763c530f043cda2eca3b2750 Mon Sep 17 00:00:00 2001 From: Eric House Date: Tue, 7 Jul 2020 11:54:45 -0700 Subject: [PATCH] fix to include optional info.txt info --- xwords4/dawg/Makefile.langcommon | 8 +++++--- xwords4/dawg/mkbyodbins.sh | 4 ++-- xwords4/dawg/xloc.py | 6 +++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/xwords4/dawg/Makefile.langcommon b/xwords4/dawg/Makefile.langcommon index fa07f27bc..549b04b31 100644 --- a/xwords4/dawg/Makefile.langcommon +++ b/xwords4/dawg/Makefile.langcommon @@ -16,9 +16,11 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -ifndef XWDICTPATH -$(error XWDICTPATH is not set) -endif +# This breaks generating byod files on otherwise-unconfigured +# machines. Move it perhaps? +# ifndef XWDICTPATH +# $(error XWDICTPATH is not set) +# endif ifneq ($(DIRTY_LIST),) BOWDLERIZER = ../remove-dirty.py $(DIRTY_LIST) diff --git a/xwords4/dawg/mkbyodbins.sh b/xwords4/dawg/mkbyodbins.sh index 1ae648281..fedd03483 100755 --- a/xwords4/dawg/mkbyodbins.sh +++ b/xwords4/dawg/mkbyodbins.sh @@ -2,6 +2,6 @@ for INFO in $(ls */info.txt); do DIR=$(dirname $INFO) - echo "*** processing $(basename $DIRNAME) ***" - (cd $DIR && make byodbins) + echo "*** processing $(basename $DIR) ***" + (cd $DIR && make clean byodbins) done diff --git a/xwords4/dawg/xloc.py b/xwords4/dawg/xloc.py index 1eb56b1ac..c329ebd34 100755 --- a/xwords4/dawg/xloc.py +++ b/xwords4/dawg/xloc.py @@ -28,8 +28,8 @@ sPreComment = re.compile('^(.*)#.*$') sVarAssign = re.compile('^(\w+):(.*)$') sBeginTiles = re.compile('^$') sEndTiles = re.compile('^$') -sSingleCharMatch = re.compile('\'(.(\|.)+)\'') -sSpecialsMatch = re.compile('{"(.+)"}') +sSingleCharMatch = re.compile("'(.(\|.)*)'") +sSpecialsMatch = re.compile('{"(.+)"(,.+)?}') def parseTileInfo(infoFile, encoding): result = {'_TILES' : []} @@ -53,7 +53,7 @@ def parseTileInfo(infoFile, encoding): if sEndTiles.match(line): break else: - (count, val, face) = line.split(None, 3) + (count, val, face) = line.split(None, 2) result['_TILES'].append((count, val, face)) elif sBeginTiles.match(line): inTiles = True