From 4c4a2edabf2d71354c4e94f98fe691a9110ed8d4 Mon Sep 17 00:00:00 2001 From: tuberry <17917040+tuberry@users.noreply.github.com> Date: Tue, 5 Jan 2021 07:30:53 +0800 Subject: [PATCH] cleanup --- Makefile | 4 +--- ecdicts.py | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 23f39d1..9a21df8 100644 --- a/Makefile +++ b/Makefile @@ -9,10 +9,8 @@ endif all: $(PKGNAME).index $(PKGNAME).dict.dz -$(FILENAME).zip: +$(PKGNAME).csv: curl -kLO $(URL)/releases/download/$(VERSION)/$(FILENAME).zip - -$(PKGNAME).csv: $(FILENAME).zip unzip $(FILENAME).zip && mv $(CSVNAME).csv $(PKGNAME).csv $(PKGNAME).txt: $(PKGNAME).csv diff --git a/ecdicts.py b/ecdicts.py index 55d2e74..8d0f3d9 100644 --- a/ecdicts.py +++ b/ecdicts.py @@ -10,6 +10,8 @@ reader = csv.reader(f, delimiter=',') next(reader, None) for l in reader: + if ' ' in l[0]: + continue g.write(':'+l[0]+':\n') if l[3] != '': a = '\n'.join(l[3].split('\\n'))