From 84c0f9a2501fbb77e93586e9ac25da1f35945acf Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Tue, 16 Aug 2022 18:23:57 -0500 Subject: Write a Python script for generating an HTML file of almost every Unicode character --- .gitignore | 1 + main.py | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .gitignore create mode 100644 main.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dcaf716 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +index.html diff --git a/main.py b/main.py new file mode 100644 index 0000000..5295f05 --- /dev/null +++ b/main.py @@ -0,0 +1,16 @@ +def color(x): + ret = '' + for i in range(0, 6): + ret += hex(2 * (x // 8**i % 8))[2:] + return ret + +f = open('index.html', 'w') +f.write('\n') +f.write('
\n') +for i in range(0, 2**18): + try: + f.write('' + chr(i) + '\n') + except: + pass +f.write('\n') +f.close() -- cgit v1.2.3-70-g09d2