From f2e67ef6c03c07e0a5aee740d1621a0f7ed32313 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?tr=C3=A9meur?= Date: Sun, 2 Jul 2023 15:09:52 +0100 Subject: [PATCH] =?UTF-8?q?Sort=20fandoms=20properly,=20don=E2=80=99t=20re?= =?UTF-8?q?turn=20false=20positives=20for=20locked=20fics?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fandoms.py | 4 ++-- sortfics.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fandoms.py b/fandoms.py index 75ed142..8cae1f7 100644 --- a/fandoms.py +++ b/fandoms.py @@ -47,9 +47,9 @@ def fandomlist(local=False): newfandom = "FF0" + fandom[-1] else: newfandom = fandom - fandomlist.append({"searchname":fandom,"sortname":newfandom.replace("FF","Final Fantasy "),"displayname":fandom.replace("FF","Final Fantasy ")}) + fandomlist.append({"searchname":fandom,"sortname":newfandom.replace("FF","Final Fantasy ").lower(),"displayname":fandom.replace("FF","Final Fantasy ")}) else: - fandomlist.append({"searchname":fandom,"sortname":fandom,"displayname":fandom}) + fandomlist.append({"searchname":fandom,"sortname":fandom.lower(),"displayname":fandom}) fandomlist = sorted(fandomlist, key=lambda d: d["sortname"]) for fandom in fandomlist: fandomfics = [] diff --git a/sortfics.sh b/sortfics.sh index 8a83361..58bf308 100755 --- a/sortfics.sh +++ b/sortfics.sh @@ -17,11 +17,11 @@ do then if test -f "originalsmeta/${ficstring}.py" then - if grep -q "locked = True" "originalsmeta/${ficstring}.py" + if grep -q "^locked = True" "originalsmeta/${ficstring}.py" then builddir="secret" else - if grep -q "locked = False" "originalsmeta/${ficstring}.py" + if grep -q "^locked = False" "originalsmeta/${ficstring}.py" then builddir="files" fi @@ -29,11 +29,11 @@ do else if test -f "translationsmeta/${ficstring}.py" then - if grep -q "locked = True" "translationsmeta/${ficstring}.py" + if grep -q "^locked = True" "translationsmeta/${ficstring}.py" then builddir="secret" else - if grep -q "locked = False" "translationsmeta/${ficstring}.py" + if grep -q "^locked = False" "translationsmeta/${ficstring}.py" then builddir="files" fi