From 260998464bdda4627a15d1b40e2a9460c990f1dd Mon Sep 17 00:00:00 2001 From: "Mark E. Shoulson" Date: Mon, 1 Jun 2020 11:26:44 -0400 Subject: Added entries for new emoji in emoji-base Not necessarily key sequences for all that could have them. --- baserefresh.pl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 baserefresh.pl (limited to 'baserefresh.pl') diff --git a/baserefresh.pl b/baserefresh.pl new file mode 100644 index 0000000..f684569 --- /dev/null +++ b/baserefresh.pl @@ -0,0 +1,27 @@ +#!/usr/bin/perl -n +my $last; + +# The whole "base" file format took shape kind of sloppily, just getting a +# list of likely-looking characters and all, which is why it's sort of a +# mess. It also didn't really have good ways of updating it with new +# emoji. This file is _part_ of such a solution: it takes in a "base" file +# and adds the "" line after just those "#-" lines which are not +# followed by a line that starts with "##" or with NO #-signs. + +BEGIN {binmode(STDOUT, ":utf8"); + binmode(STDIN, ":utf8"); +} + +while (/^#- /) { + $last = $_; + print; + $_ = <>; + if (/^[^#]/ or /^##/) { + last; + } + $last = substr($last, 3); + @_ = split /;/, $last; + printf qq( \{%s\} : "%s" U%s\t# %s\n), lc($_[1]),chr(hex($_[0])), $_[0], $_[1]; +} +print; + -- cgit v1.2.3