htmlkanaview 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: htmlkanaview
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: read descript thag writed by korean what write in github.
|
|
5
|
+
Home-page: https://github.com/FarAway6834/htmlkanaview
|
|
6
|
+
Author: du7ec
|
|
7
|
+
Author-email: dutec6834@gmail.com
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Requires-Python: >=3.5
|
|
19
|
+
License-File: LICENCE
|
|
20
|
+
Requires-Dist: toolz
|
|
21
|
+
Dynamic: author
|
|
22
|
+
Dynamic: author-email
|
|
23
|
+
Dynamic: classifier
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
Dynamic: requires-dist
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
Dynamic: summary
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
htmlkanaview.py,sha256=V_mP_l6vUhoXHq6o7CStoGH2RzDnIpx88dRz0xoe-9I,818
|
|
2
|
+
htmlkanaview-0.0.1.dist-info/licenses/LICENCE,sha256=0pRoXtlTqZtROIWekexbubCXObtGJ14Ug0CXdTJ8G6g,440
|
|
3
|
+
htmlkanaview-0.0.1.dist-info/METADATA,sha256=OzrPsj-YRmFTH5esECUsTc6NhAMVK40BA_9vpL7usJo,961
|
|
4
|
+
htmlkanaview-0.0.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
5
|
+
htmlkanaview-0.0.1.dist-info/top_level.txt,sha256=H-nzfm1jr8ChFKzJZH8nsldKDLeSqRd3CTp-tyMvWLs,13
|
|
6
|
+
htmlkanaview-0.0.1.dist-info/RECORD,,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ----------------------------------------------------------------------------
|
|
3
|
+
* "THE BEER-WARE LICENSE" (Revision 42):
|
|
4
|
+
* <faway6834@gmail.com> wrote this file. As long as you retain this notice you
|
|
5
|
+
* can do whatever you want with this stuff. If we meet some day, and you think
|
|
6
|
+
* this stuff is worth it, you can buy me a beer in return FarAway6834
|
|
7
|
+
* ----------------------------------------------------------------------------
|
|
8
|
+
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
htmlkanaview
|
htmlkanaview.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from toolz import compose, partial, reduce
|
|
2
|
+
|
|
3
|
+
isolate = compose('\u2063\u200b\u2063'.join, partial(map, '{}\u20de'.format))
|
|
4
|
+
|
|
5
|
+
kanaview = compose("".join, partial(map, lambda x : x[1]), partial(sorted, key = lambda x : x[0]), lambda x : (([i, i + 1, i - 1][i % 3], [isolate, '\ufffa{}\ufffb'.format, compose('\ufff9'.__add__, isolate)][i % 3](j)) for i, j in enumerate((x for x in x.split(")") for x in x.split("[") for x in x.split("](")))))
|
|
6
|
+
|
|
7
|
+
ruby_replace_table = {"\ufff9" : "<ruby>", "\ufffa" : "<rp>(</rp><rt>", "\ufffb" : "</rt><rp)</rp></ruby>"}
|
|
8
|
+
|
|
9
|
+
RubyUnicode2Html = lambda x : reduce(lambda x, t : x.replace(*t), (x, *ruby_replace_table.items()))
|
|
10
|
+
|
|
11
|
+
RubyHtml2Unicode = lambda x : reduce(lambda x, t : x.replace(t[1], t[0]), (x, *ruby_replace_table.items()))
|
|
12
|
+
|
|
13
|
+
htmlkanaview = lambda x : RubyUnicode2Html(kanaview(x))
|