Merge commit '6346ede604270202b2aad8159cb914b7a2276c34'

This commit is contained in:
Reece H. Dunn
2017-02-12 21:32:06 +00:00
11 changed files with 1000 additions and 137 deletions
+11 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/python
# Copyright (C) 2012-2014 Reece H. Dunn
# Copyright (C) 2012-2017 Reece H. Dunn
#
# This file is part of ucd-tools.
#
@@ -50,6 +50,9 @@ class CodePoint:
def __lt__(self, other):
return self.codepoint < other.codepoint
def char(self):
return unichr(self.codepoint)
class CodeRange:
def __init__(self, x):
f, l = x.split('..')
@@ -69,6 +72,9 @@ class CodeRange:
def size(self):
return self.last.codepoint - self.first.codepoint + 1
def char(self):
return unichr(self.first.codepoint)
def codepoint(x):
if '..' in x[0]:
return CodeRange(x[0]), x[1:]
@@ -107,6 +113,10 @@ data_items = {
('Range', codepoint),
('Age', string),
],
'DerivedCoreProperties': [
('Range', codepoint),
('Property', string),
],
'PropList': [
('Range', codepoint),
('Property', string),