From 36fd258381c2d846b19baaccc95e3cedec95c2f3 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Sun, 4 Feb 2024 16:45:42 +0000 Subject: [PATCH] limit emojis to only smileys as there's too many now --- src/lib/emurrjilist.nim | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/emurrjilist.nim b/src/lib/emurrjilist.nim index 42d43e7..7fca9aa 100644 --- a/src/lib/emurrjilist.nim +++ b/src/lib/emurrjilist.nim @@ -10,17 +10,19 @@ type proc `$`(e: Emoji): string = return e.emoji & " : " & e.name & " : " & e.group & " : " & e.subgroup -const ignore_groups = ["Flags", "Symbols"] -const include_groups_override = ["geometric", "other-symbol"] +const include_groups = ["Smileys & Emotion"] +#, "People & Body"] +#, "Animals & Nature"] +#, "Food & Drink"] +#, "Travel & Places", "Activities", "Objects"] +const ignore_subgroups = ["religion"] proc getEmojis(): seq[string] = let file_emojis = staticRead("../../emojis.json") let emojis = file_emojis.fromJson(seq[Emoji]) var list: seq[string] = @[] for e in emojis: - if e.group notin ignore_groups and e.subgroup in ignore_groups: - list.add($e) - if e.subgroup in include_groups_override: + if e.group in include_groups and e.subgroup notin ignore_subgroups: list.add($e) return list