From f62eca657a79ef81089f3c34cdf837d7463581db Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 26 Jun 2021 14:59:09 +0200 Subject: Add ipa, man, and unicode scripts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- dmenu/unicode.d/Makefile | 19 +++++++++++++++++++ dmenu/unicode.d/conv | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 dmenu/unicode.d/Makefile create mode 100755 dmenu/unicode.d/conv (limited to 'dmenu/unicode.d') diff --git a/dmenu/unicode.d/Makefile b/dmenu/unicode.d/Makefile new file mode 100644 index 0000000..d34b4d6 --- /dev/null +++ b/dmenu/unicode.d/Makefile @@ -0,0 +1,19 @@ +URL = https://www.unicode.org/Public/UCD/latest/ucd/NamesList.txt + +all: list + +NamesList.txt: + wget -O $@ $(URL) || curl $(URL) > $@ || cp $@.backup $@ + cp -- $@ $@.backup + +list: NamesList.txt + wget -O NamesList.txt $(URL) + ./conv < NamesList.txt > $@ + +clean: + -rm -f -- NamesList.txt NamesList.txt.backup + +reallyclean: clean + -rm -f list + +.PHONY: all diff --git a/dmenu/unicode.d/conv b/dmenu/unicode.d/conv new file mode 100755 index 0000000..ca8fb35 --- /dev/null +++ b/dmenu/unicode.d/conv @@ -0,0 +1,8 @@ +#!/usr/bin/python3 +try: + while True: + cols = input().split('\t') + if len(cols) == 2 and '<' not in cols[1] and cols[0] and all(c in '0123456789abcdefABCDEF' for c in cols[0]): + print(chr(int(cols[0], 16)) + ' ' + cols[0] + ' ' + cols[1]) +except EOFError: + pass -- cgit v1.2.3-70-g09d2