Utilities, syllabic timestamp
Project description
jxtr
This module provides a way to encode an integer in syllables. That's a tool I use sometimes to timestamp files or generate a code. (I've used this as a my first git repo...)
Description
This module "t" contains 1 single class Say. The prupose is to define and use a syllabic representation of positive integers A syllab is build with 1 consonant in lower case and 1 vowel in upper case.
A word is build with 2 syllabs. Words are separated by "-"
The alpĥabet has 6 vowels and 20 consonants, so a syllab can depict 120 numbers and a word of 2 syllabs can then depict 120*120 = 14_440 numbers.
The object can provide the code generated, a word swapped version of the code, the reverse code or with both transformations.
Example 1:
Integer 11_566 is encoded by the string "jIvU"
jIvU can be visually easier to read, say and remember
Can be use as a timestamp for file,
as a friendly depiction of a phone number or any other number
Example 2:
Unix epochs 1546850909 is encoded by the string "Me-GeBe-TiKa"
Reverse version is "aKiT-eBeG-eM"
Swapped version is "Ka-TiBe-GeMe"
Both transformations version is "eMeG-eBiT-aK"
This represents the date "Mon Jan 7 09:48:29 2019"
Code example :
### Timestamp ###
print("default value = now unix epochs seconds")
test = Say()
print("value : " + str(test.value))
print("code : " + test.code)
test.swap = False
print("swap : " + test.code)
test.reverse = True
print("reversed : " + test.code)
print("date : " + test.to_datetime())
print("string code for int 165 : " + Say(165).code)
print("int value for code MaCa : " +
str(Say(code="MaCa").value))
print("value :", Say(1542661750).value)
print("value for swap Ka-QiMu-SeNo :",
Say(code="Ka-QiMu-SeNo").value)
print("value for code NoSe-MuQi-Ka :",
Say(code="NoSe-MuQi-Ka", swap=False).value)
print("value for reverse aK-iQuM-eSoN :",
Say(code="aK-iQuM-eSoN", swap=False, reverse=True).value)
print("value for both oNeS-uMiQ-aK :",
Say(code="oNeS-uMiQ-aK", swap=True, reverse=True).value)
Pronunciation rules:
Vowels:
A: /a/, /ɑ/
E: /ɛ/
I: /i/
O: /o/
U: /y/, /ɥ/
Y: /aj/
Consonants:
b: /b/
c: /ʃ/ (ch)
d: /d/
f: /f/
g: /ɡ/
h: .
j: /ʒ/
k: /k/
l: /l/
m: /m/
n: /n/
p: /p/
q: /kw/
r: /ʁ/
s: /s/
t: /t/
v: /v/
w: /w/
x: /ɡz/, /ks/
z: /z/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file jxtr-2.1.5.tar.gz
.
File metadata
- Download URL: jxtr-2.1.5.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d9e4c351e0a6b67bee0fb90cfb376b0979c84220a805db9c2b8d0fef67ce4ad |
|
MD5 | 9fbbbca77bbdd77902c084d2e546d2fb |
|
BLAKE2b-256 | f5a0953a17fe446d1888582057817d75cfbe825d862cb3f203d86818cd52e68c |
File details
Details for the file jxtr-2.1.5-py3-none-any.whl
.
File metadata
- Download URL: jxtr-2.1.5-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d1dc7517d8dbbe1c08366f6c230d416c4cbb6e4d200ca3a2e841b745d634ec |
|
MD5 | b66e2c09cd7c72a699b0111b34127ee8 |
|
BLAKE2b-256 | 55bde1e64063f8ecce2c892c471b7392d0d9b78cc4077d9fe52adb1c0e5a8570 |