limit emojis to only smileys as there's too many now
This commit is contained in:
parent
f825d0ca59
commit
36fd258381
1 changed files with 7 additions and 5 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue