chronossync-lite 0.1.0__tar.gz
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.
- chronossync_lite-0.1.0/LICENSE +21 -0
- chronossync_lite-0.1.0/MANIFEST.in +4 -0
- chronossync_lite-0.1.0/PKG-INFO +95 -0
- chronossync_lite-0.1.0/README.md +74 -0
- chronossync_lite-0.1.0/setup.cfg +4 -0
- chronossync_lite-0.1.0/setup.py +26 -0
- chronossync_lite-0.1.0/src/chronossync_lite/__init__.py +2 -0
- chronossync_lite-0.1.0/src/chronossync_lite/chronossync_lite.py +44 -0
- chronossync_lite-0.1.0/src/chronossync_lite.egg-info/PKG-INFO +95 -0
- chronossync_lite-0.1.0/src/chronossync_lite.egg-info/SOURCES.txt +11 -0
- chronossync_lite-0.1.0/src/chronossync_lite.egg-info/dependency_links.txt +1 -0
- chronossync_lite-0.1.0/src/chronossync_lite.egg-info/top_level.txt +1 -0
- chronossync_lite-0.1.0/tests/test_logic.py +13 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 TheLostIdea1
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chronossync-lite
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight live ticking clock with custom ordinals.
|
|
5
|
+
Author: TheLostIdea1
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.6
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: classifier
|
|
15
|
+
Dynamic: description
|
|
16
|
+
Dynamic: description-content-type
|
|
17
|
+
Dynamic: license
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
*MIT License*
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
*Python 3.6+*
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
*Author: TheLostIdea1*
|
|
30
|
+
|
|
31
|
+
## Chronos Sync Lite
|
|
32
|
+
|
|
33
|
+
Hello, time travelers! **Chronos Sync Lite** provides a streamlined, live-ticking terminal experience. This version focuses on the core "present" functionality with a unique triple-naming system.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### 1. Installation & Setup
|
|
38
|
+
|
|
39
|
+
Install the library using `pip` from your local build:
|
|
40
|
+
|
|
41
|
+
```shell
|
|
42
|
+
pip install .
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
or
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
pip install chronossync-lite
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### 2. Usage & Syntax
|
|
54
|
+
|
|
55
|
+
**Chronos Sync Lite** can be used in the REPL or within a Python script.
|
|
56
|
+
|
|
57
|
+
#### Python Script Usage
|
|
58
|
+
When using a script, you must wrap the call in `print()` to trigger the internal display loop:
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
import chronossync_lite
|
|
62
|
+
|
|
63
|
+
# Triple naming: Package.Module/Class.Method
|
|
64
|
+
print(chronossync_lite.chronossync_lite.present())
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### REPL Usage
|
|
68
|
+
In a REPL environment, simply evaluating the method will trigger the clock:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
>>> import chronossync_lite
|
|
72
|
+
>>> chronossync_lite.chronossync_lite.present()
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### 3. Logic and Mechanics
|
|
78
|
+
|
|
79
|
+
* **Triple Naming**: Access the logic via `chronossync_lite.chronossync_lite.present()`.
|
|
80
|
+
* **Anti-Flicker (\r)**: Uses carriage returns to overwrite the current line, preserving terminal history.
|
|
81
|
+
* **The "Ordinal" Logic**: Follows a custom convention:
|
|
82
|
+
* 1st, 2nd, 3th (e.g., "3th of March").
|
|
83
|
+
* Applies to the tens place: 21st, 22nd, 23th.
|
|
84
|
+
* **Graceful Termination**: Press Ctrl+C at any time to stop the live loop and return to the prompt.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 4. Development & Testing
|
|
89
|
+
|
|
90
|
+
This project uses the modern `src` layout. To verify the logic, run the test suite from the root directory:
|
|
91
|
+
|
|
92
|
+
```shell
|
|
93
|
+
python -m unittest discover tests
|
|
94
|
+
```
|
|
95
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+

|
|
2
|
+
*MIT License*
|
|
3
|
+
|
|
4
|
+

|
|
5
|
+
*Python 3.6+*
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+
*Author: TheLostIdea1*
|
|
9
|
+
|
|
10
|
+
## Chronos Sync Lite
|
|
11
|
+
|
|
12
|
+
Hello, time travelers! **Chronos Sync Lite** provides a streamlined, live-ticking terminal experience. This version focuses on the core "present" functionality with a unique triple-naming system.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### 1. Installation & Setup
|
|
17
|
+
|
|
18
|
+
Install the library using `pip` from your local build:
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
pip install .
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
or
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
pip install chronossync-lite
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
### 2. Usage & Syntax
|
|
33
|
+
|
|
34
|
+
**Chronos Sync Lite** can be used in the REPL or within a Python script.
|
|
35
|
+
|
|
36
|
+
#### Python Script Usage
|
|
37
|
+
When using a script, you must wrap the call in `print()` to trigger the internal display loop:
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
import chronossync_lite
|
|
41
|
+
|
|
42
|
+
# Triple naming: Package.Module/Class.Method
|
|
43
|
+
print(chronossync_lite.chronossync_lite.present())
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### REPL Usage
|
|
47
|
+
In a REPL environment, simply evaluating the method will trigger the clock:
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
>>> import chronossync_lite
|
|
51
|
+
>>> chronossync_lite.chronossync_lite.present()
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### 3. Logic and Mechanics
|
|
57
|
+
|
|
58
|
+
* **Triple Naming**: Access the logic via `chronossync_lite.chronossync_lite.present()`.
|
|
59
|
+
* **Anti-Flicker (\r)**: Uses carriage returns to overwrite the current line, preserving terminal history.
|
|
60
|
+
* **The "Ordinal" Logic**: Follows a custom convention:
|
|
61
|
+
* 1st, 2nd, 3th (e.g., "3th of March").
|
|
62
|
+
* Applies to the tens place: 21st, 22nd, 23th.
|
|
63
|
+
* **Graceful Termination**: Press Ctrl+C at any time to stop the live loop and return to the prompt.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### 4. Development & Testing
|
|
68
|
+
|
|
69
|
+
This project uses the modern `src` layout. To verify the logic, run the test suite from the root directory:
|
|
70
|
+
|
|
71
|
+
```shell
|
|
72
|
+
python -m unittest discover tests
|
|
73
|
+
```
|
|
74
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
|
|
3
|
+
# Reading the cleaned README.md for the long description
|
|
4
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
5
|
+
long_description = fh.read()
|
|
6
|
+
|
|
7
|
+
setup(
|
|
8
|
+
name="chronossync-lite",
|
|
9
|
+
version="0.1.0",
|
|
10
|
+
author="TheLostIdea1",
|
|
11
|
+
description="A lightweight live ticking clock with custom ordinals.",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
license="MIT",
|
|
15
|
+
include_package_data=True,
|
|
16
|
+
# Maps the 'src' directory to the package
|
|
17
|
+
packages=find_packages(where="src"),
|
|
18
|
+
package_dir={"": "src"},
|
|
19
|
+
python_requires=">=3.6",
|
|
20
|
+
classifiers=[
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
],
|
|
25
|
+
)
|
|
26
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import time
|
|
2
|
+
import sys
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
|
|
5
|
+
class chronossync_lite:
|
|
6
|
+
def __init__(self):
|
|
7
|
+
self._now = datetime.now()
|
|
8
|
+
|
|
9
|
+
def _get_tz_string(self):
|
|
10
|
+
offset_seconds = -time.timezone if (time.daylight == 0) else -time.altzone
|
|
11
|
+
sign = "+" if offset_seconds >= 0 else "-"
|
|
12
|
+
offset_abs = abs(offset_seconds)
|
|
13
|
+
hours = offset_abs // 3600
|
|
14
|
+
minutes = (offset_abs % 3600) // 60
|
|
15
|
+
return f"GMT{sign}{hours:02}:{minutes:02}"
|
|
16
|
+
|
|
17
|
+
def _get_ordinal(self, day):
|
|
18
|
+
# Custom logic: 1st, 2nd, 3th... 21st, 22nd, 23th
|
|
19
|
+
if 11 <= day <= 13: return f"{day}th"
|
|
20
|
+
last_digit = day % 10
|
|
21
|
+
if last_digit == 1: return f"{day}st"
|
|
22
|
+
if last_digit == 2: return f"{day}nd"
|
|
23
|
+
return f"{day}th"
|
|
24
|
+
|
|
25
|
+
@classmethod
|
|
26
|
+
def present(cls):
|
|
27
|
+
return cls()
|
|
28
|
+
|
|
29
|
+
def __repr__(self):
|
|
30
|
+
try:
|
|
31
|
+
while True:
|
|
32
|
+
now = datetime.now()
|
|
33
|
+
day_str = self._get_ordinal(now.day)
|
|
34
|
+
date_part = now.strftime(f"%A, {day_str} of %B, %Y")
|
|
35
|
+
time_part = now.strftime("%I:%M:%S %p")
|
|
36
|
+
tz_part = self._get_tz_string()
|
|
37
|
+
|
|
38
|
+
output = f"{date_part}, {time_part}, {tz_part}"
|
|
39
|
+
sys.stdout.write(f"\r{output}")
|
|
40
|
+
sys.stdout.flush()
|
|
41
|
+
time.sleep(1)
|
|
42
|
+
except KeyboardInterrupt:
|
|
43
|
+
return "\n[Clock Stopped]"
|
|
44
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chronossync-lite
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight live ticking clock with custom ordinals.
|
|
5
|
+
Author: TheLostIdea1
|
|
6
|
+
License: MIT
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.6
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: author
|
|
14
|
+
Dynamic: classifier
|
|
15
|
+
Dynamic: description
|
|
16
|
+
Dynamic: description-content-type
|
|
17
|
+
Dynamic: license
|
|
18
|
+
Dynamic: license-file
|
|
19
|
+
Dynamic: requires-python
|
|
20
|
+
Dynamic: summary
|
|
21
|
+
|
|
22
|
+

|
|
23
|
+
*MIT License*
|
|
24
|
+
|
|
25
|
+

|
|
26
|
+
*Python 3.6+*
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+
*Author: TheLostIdea1*
|
|
30
|
+
|
|
31
|
+
## Chronos Sync Lite
|
|
32
|
+
|
|
33
|
+
Hello, time travelers! **Chronos Sync Lite** provides a streamlined, live-ticking terminal experience. This version focuses on the core "present" functionality with a unique triple-naming system.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### 1. Installation & Setup
|
|
38
|
+
|
|
39
|
+
Install the library using `pip` from your local build:
|
|
40
|
+
|
|
41
|
+
```shell
|
|
42
|
+
pip install .
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
or
|
|
46
|
+
|
|
47
|
+
```shell
|
|
48
|
+
pip install chronossync-lite
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
### 2. Usage & Syntax
|
|
54
|
+
|
|
55
|
+
**Chronos Sync Lite** can be used in the REPL or within a Python script.
|
|
56
|
+
|
|
57
|
+
#### Python Script Usage
|
|
58
|
+
When using a script, you must wrap the call in `print()` to trigger the internal display loop:
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
import chronossync_lite
|
|
62
|
+
|
|
63
|
+
# Triple naming: Package.Module/Class.Method
|
|
64
|
+
print(chronossync_lite.chronossync_lite.present())
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
#### REPL Usage
|
|
68
|
+
In a REPL environment, simply evaluating the method will trigger the clock:
|
|
69
|
+
|
|
70
|
+
```python
|
|
71
|
+
>>> import chronossync_lite
|
|
72
|
+
>>> chronossync_lite.chronossync_lite.present()
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### 3. Logic and Mechanics
|
|
78
|
+
|
|
79
|
+
* **Triple Naming**: Access the logic via `chronossync_lite.chronossync_lite.present()`.
|
|
80
|
+
* **Anti-Flicker (\r)**: Uses carriage returns to overwrite the current line, preserving terminal history.
|
|
81
|
+
* **The "Ordinal" Logic**: Follows a custom convention:
|
|
82
|
+
* 1st, 2nd, 3th (e.g., "3th of March").
|
|
83
|
+
* Applies to the tens place: 21st, 22nd, 23th.
|
|
84
|
+
* **Graceful Termination**: Press Ctrl+C at any time to stop the live loop and return to the prompt.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
### 4. Development & Testing
|
|
89
|
+
|
|
90
|
+
This project uses the modern `src` layout. To verify the logic, run the test suite from the root directory:
|
|
91
|
+
|
|
92
|
+
```shell
|
|
93
|
+
python -m unittest discover tests
|
|
94
|
+
```
|
|
95
|
+
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
setup.py
|
|
5
|
+
src/chronossync_lite/__init__.py
|
|
6
|
+
src/chronossync_lite/chronossync_lite.py
|
|
7
|
+
src/chronossync_lite.egg-info/PKG-INFO
|
|
8
|
+
src/chronossync_lite.egg-info/SOURCES.txt
|
|
9
|
+
src/chronossync_lite.egg-info/dependency_links.txt
|
|
10
|
+
src/chronossync_lite.egg-info/top_level.txt
|
|
11
|
+
tests/test_logic.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
chronossync_lite
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
from chronossync_lite import chronossync_lite
|
|
3
|
+
|
|
4
|
+
class TestLiteLogic(unittest.TestCase):
|
|
5
|
+
def test_ordinals(self):
|
|
6
|
+
# Accessing the class via the import structure
|
|
7
|
+
clock = chronossync_lite.chronossync_lite()
|
|
8
|
+
self.assertEqual(clock._get_ordinal(3), "3th")
|
|
9
|
+
self.assertEqual(clock._get_ordinal(22), "22nd")
|
|
10
|
+
|
|
11
|
+
if __name__ == '__main__':
|
|
12
|
+
unittest.main()
|
|
13
|
+
|