summaryrefslogtreecommitdiff
path: root/.local/bin/ud
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2023-04-28 02:30:33 +0100
committerubq323 <ubq323@ubq323.website>2023-04-28 02:30:33 +0100
commit6e3a1f376fbef9d0f6f8c72d6b22ff1d40e812ed (patch)
tree10829dd8d7c7125d511c270ba392e5c5812114d8 /.local/bin/ud
parent4762791fad362c8afe1c9a2b1c555c6a8d7b79d1 (diff)
movement
Diffstat (limited to '.local/bin/ud')
-rwxr-xr-x.local/bin/ud49
1 files changed, 0 insertions, 49 deletions
diff --git a/.local/bin/ud b/.local/bin/ud
deleted file mode 100755
index a1a50ac..0000000
--- a/.local/bin/ud
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python3
-
-# unidump version 0.1.1
-# made by ubq323 in the year 2021
-# please use this software for GOOD, not for EVIL
-
-import unicodedata
-import sys
-
-uniquify = True
-arg=""
-args = sys.argv[1:]
-while len(args) > 0:
- arg = args.pop(0)
- if arg[0] != '-' or arg == "--":
- break
- if arg == "-a":
- uniquify = False
- arg = ""
-
-
-s = arg+" ".join(args)
-
-if len(s) == 0:
- s = sys.stdin.read()
-
-def row(c):
- try:
- name = unicodedata.name(c).rjust(50)
- except ValueError:
- name = "?"*50
-
- number = ("U+"+hex(ord(c))[2:].zfill(4)).rjust(7).upper()
-
- to_c = c
- if c == '\n':
- to_c = ' '
-
-
-
- return f"{to_c} | {unicodedata.category(c)} | {name} | {number}"
-
-seen = set()
-for c in s:
- if uniquify:
- if c in seen:
- continue
- seen.add(c)
- print(row(c))