3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-24 03:29:28 +01:00

utils: add a simple P10 UID generator (#87)

Reference: https://github.com/evilnet/nefarious2/blob/a29b631/doc/p10.txt#L85-L92
This commit is contained in:
James Lu 2016-04-05 18:45:00 -07:00
parent e2edc68fe8
commit dc1d9602e9

View File

@ -90,6 +90,14 @@ class TS6UIDGenerator(IncrementalUIDGenerator):
self.length = 6 self.length = 6
super().__init__(sid) super().__init__(sid)
class P10UIDGenerator(IncrementalUIDGenerator):
"""Implements an incremental P10 UID Generator."""
def __init__(self, sid):
self.allowedchars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789[]'
self.length = 3
super().__init__(sid)
class TS6SIDGenerator(): class TS6SIDGenerator():
""" """
TS6 SID Generator. <query> is a 3 character string with any combination of TS6 SID Generator. <query> is a 3 character string with any combination of