From 93e90d231bb01ad02d25385c6540ee25a81629fc Mon Sep 17 00:00:00 2001 From: Zhao Zuohong <1040110848@qq.com> Date: Sun, 16 Oct 2022 11:08:20 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20New=20patch:=20colon=20rem?= =?UTF-8?q?oval?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/patch/31-4/colon-removal.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 data/patch/31-4/colon-removal.py diff --git a/data/patch/31-4/colon-removal.py b/data/patch/31-4/colon-removal.py new file mode 100755 index 0000000..c12cba0 --- /dev/null +++ b/data/patch/31-4/colon-removal.py @@ -0,0 +1,15 @@ +#!/usr/bin/env python3 +# # -*- coding: utf-8 -*- + +import re +import sys + +sys.path.append("../../convert/31-4") +from db import * + +db.bind(provider="sqlite", filename="../../clean/31-4/data.sqlite3") +db.generate_mapping() + +with db_session: + for i in Outfit.select(): + i.name = re.sub(r"(.+?):(.*)", r"\2\1", i.name)