aboutsummaryrefslogtreecommitdiff
path: root/sort-interim.pl
diff options
context:
space:
mode:
authorMark Shoulson <mark@kli.org>2016-03-17 21:21:56 -0400
committerMark Shoulson <mark@kli.org>2016-03-17 21:24:36 -0400
commit985c78396272e460deb52c8729bd57a5706e404e (patch)
tree74ff05210b354fbb0af920e8fc1ad1e893b367ca /sort-interim.pl
parentAdd new Emoji file and support. (diff)
downloaddotXCompose-985c78396272e460deb52c8729bd57a5706e404e.tar.gz
dotXCompose-985c78396272e460deb52c8729bd57a5706e404e.tar.bz2
dotXCompose-985c78396272e460deb52c8729bd57a5706e404e.zip
Add some missed emoji, add conventions to interim, add sorter,
add emoji.compose, even though it's derived.
Diffstat (limited to 'sort-interim.pl')
-rwxr-xr-xsort-interim.pl32
1 files changed, 32 insertions, 0 deletions
diff --git a/sort-interim.pl b/sort-interim.pl
new file mode 100755
index 0000000..2bd2a31
--- /dev/null
+++ b/sort-interim.pl
@@ -0,0 +1,32 @@
+#!/usr/bin/env perl
+
+my $this;
+my %elts;
+
+sub process {
+ my $data = shift;
+ my $key;
+
+ $data =~ m@\s+(U[[:xdigit:]]+)\s+@;
+ $key=$1;
+ if ($elts{$key}) {
+ print STDERR "Warning: key $key found more than once.\n";
+ }
+ $elts{$key}=$data;
+}
+
+while (<>) {
+ if (/(?:###\+)?<MM>/) {
+ while (/(?:###\+)?<MM>/) {
+ $this .= $_;
+ $_ = <>;
+ }
+ process $this;
+ $this='';
+ }
+ $this .= $_;
+}
+
+for $k (sort keys %elts) {
+ print $elts{$k};
+}