nexusclock 1.0.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.
- nexusclock-1.0.0/LICENSE.txt +19 -0
- nexusclock-1.0.0/MANIFEST.in +4 -0
- nexusclock-1.0.0/PKG-INFO +146 -0
- nexusclock-1.0.0/README.md +118 -0
- nexusclock-1.0.0/nexusclock/__init__.py +8 -0
- nexusclock-1.0.0/nexusclock/nexusclock.py +455 -0
- nexusclock-1.0.0/nexusclock.egg-info/PKG-INFO +146 -0
- nexusclock-1.0.0/nexusclock.egg-info/SOURCES.txt +11 -0
- nexusclock-1.0.0/nexusclock.egg-info/dependency_links.txt +1 -0
- nexusclock-1.0.0/nexusclock.egg-info/requires.txt +2 -0
- nexusclock-1.0.0/nexusclock.egg-info/top_level.txt +1 -0
- nexusclock-1.0.0/setup.cfg +4 -0
- nexusclock-1.0.0/setup.py +25 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (c) 2026 Light Bulb Experiments
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nexusclock
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A powerful live clock library with timezone support and reverse time
|
|
5
|
+
Home-page: https://nexusclock.today
|
|
6
|
+
Author: Light Bulb Experiments
|
|
7
|
+
Author-email: lightbulb@example.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE.txt
|
|
15
|
+
Requires-Dist: rich>=10.0.0
|
|
16
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: requires-python
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# NexusClock
|
|
30
|
+
|
|
31
|
+
A powerful live clock library with timezone support, custom dates, and reverse time functionality.
|
|
32
|
+
|
|
33
|
+
## How to install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
python -m pip install nexusclock
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from nexusclock import nexusclock
|
|
43
|
+
|
|
44
|
+
# Current time (12-hour format) - Just works!
|
|
45
|
+
nexusclock.nexusclock.today()
|
|
46
|
+
|
|
47
|
+
# Current time (24-hour format)
|
|
48
|
+
nexusclock.nexusclock.today()._24h()
|
|
49
|
+
|
|
50
|
+
# Time going backwards (reverse)
|
|
51
|
+
nexusclock.nexusclock.backwards()
|
|
52
|
+
|
|
53
|
+
# Reverse time in 24-hour format
|
|
54
|
+
nexusclock.nexusclock.backwards()._24h()
|
|
55
|
+
|
|
56
|
+
# Custom date/time
|
|
57
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")
|
|
58
|
+
|
|
59
|
+
# Custom with 24-hour format
|
|
60
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()
|
|
61
|
+
|
|
62
|
+
# Custom going backwards
|
|
63
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()
|
|
64
|
+
|
|
65
|
+
# Change timezone
|
|
66
|
+
nexusclock.nexusclock.changetz("America/New_York")
|
|
67
|
+
|
|
68
|
+
# Show help guide
|
|
69
|
+
nexusclock.nexusclock.help()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Methods
|
|
73
|
+
|
|
74
|
+
| Method | Description | Example |
|
|
75
|
+
|--------|-------------|---------|
|
|
76
|
+
| `today()` | Current time (12-hour live) | `nexusclock.nexusclock.today()` |
|
|
77
|
+
| `today()._24h()` | Current time (24-hour live) | `nexusclock.nexusclock.today()._24h()` |
|
|
78
|
+
| `backwards()` | Time going backwards (12-hour) | `nexusclock.nexusclock.backwards()` |
|
|
79
|
+
| `backwards()._24h()` | Time going backwards (24-hour) | `nexusclock.nexusclock.backwards()._24h()` |
|
|
80
|
+
| `custom("YYYY-MM-DD HH:MM:SS")` | Custom date/time | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")` |
|
|
81
|
+
| `custom()._24h()` | Custom in 24-hour format | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()` |
|
|
82
|
+
| `custom().backwards()` | Custom going backwards | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()` |
|
|
83
|
+
| `custom().backwards()._24h()` | Custom backwards in 24-hour | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()._24h()` |
|
|
84
|
+
| `changetz("Timezone")` | Change timezone | `nexusclock.nexusclock.changetz("America/New_York")` |
|
|
85
|
+
| `changetz()._24h()` | Timezone with 24-hour format | `nexusclock.nexusclock.changetz("UTC")._24h()` |
|
|
86
|
+
| `changetz().backwards()` | Timezone going backwards | `nexusclock.nexusclock.changetz("Europe/London").backwards()` |
|
|
87
|
+
| `help()` | Show help guide | `nexusclock.nexusclock.help()` |
|
|
88
|
+
|
|
89
|
+
## Features
|
|
90
|
+
|
|
91
|
+
- ✅ **Live clock** with carriage return updates (no screen flicker)
|
|
92
|
+
- ✅ **12/24 hour formats** support
|
|
93
|
+
- ✅ **Reverse time** mode (time goes backwards)
|
|
94
|
+
- ✅ **Custom date/time** with validation
|
|
95
|
+
- ✅ **Timezone switching** with automatic offset
|
|
96
|
+
- ✅ **Automatic location detection** via IP geolocation
|
|
97
|
+
- ✅ **Ordinal suffixes** (st, nd, rd, th) for day numbers
|
|
98
|
+
- ✅ **Keyboard interrupt & EOF error handling** - no crashes!
|
|
99
|
+
- ✅ **Rich panel help guide** with beautiful formatting
|
|
100
|
+
- ✅ **Supports both class and instance methods**
|
|
101
|
+
|
|
102
|
+
## Example Output
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
The 9th of July, 2026, 4:52:38 PM, GMT+6 (Paltan, Bangladesh)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Requirements
|
|
109
|
+
|
|
110
|
+
- Python 3.7+
|
|
111
|
+
- rich >= 10.0.0
|
|
112
|
+
- python-dateutil >= 2.8.0
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
Copyright (c) 2026 Light Bulb Experiments
|
|
117
|
+
|
|
118
|
+
MIT License - see [LICENSE.txt](LICENSE.txt)
|
|
119
|
+
|
|
120
|
+
## Links
|
|
121
|
+
|
|
122
|
+
- **Homepage**: https://nexusclock.today
|
|
123
|
+
- **Target**: `nexusclock.nexusclock.today()`
|
|
124
|
+
- **Class**: `nexusclock`
|
|
125
|
+
- **Author**: Light Bulb Experiments
|
|
126
|
+
|
|
127
|
+
## Why NexusClock?
|
|
128
|
+
|
|
129
|
+
- 🚀 **Zero configuration** - Just import and use
|
|
130
|
+
- 🌍 **Location aware** - Automatically detects your timezone
|
|
131
|
+
- 🎯 **Simple API** - Chain methods for different formats
|
|
132
|
+
- ⚡ **Real-time updates** - Live clock with smooth updates
|
|
133
|
+
- 🛡️ **No crashes** - Handles all errors gracefully
|
|
134
|
+
- 📦 **Lightweight** - Minimal dependencies
|
|
135
|
+
|
|
136
|
+
## Contributing
|
|
137
|
+
|
|
138
|
+
Contributions are welcome! Please feel free to submit issues and pull requests.
|
|
139
|
+
|
|
140
|
+
## Support
|
|
141
|
+
|
|
142
|
+
For issues and feature requests, please open an issue on our GitHub repository.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
**Made with ❤️ by Light Bulb Experiments**
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# NexusClock
|
|
2
|
+
|
|
3
|
+
A powerful live clock library with timezone support, custom dates, and reverse time functionality.
|
|
4
|
+
|
|
5
|
+
## How to install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m pip install nexusclock
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from nexusclock import nexusclock
|
|
15
|
+
|
|
16
|
+
# Current time (12-hour format) - Just works!
|
|
17
|
+
nexusclock.nexusclock.today()
|
|
18
|
+
|
|
19
|
+
# Current time (24-hour format)
|
|
20
|
+
nexusclock.nexusclock.today()._24h()
|
|
21
|
+
|
|
22
|
+
# Time going backwards (reverse)
|
|
23
|
+
nexusclock.nexusclock.backwards()
|
|
24
|
+
|
|
25
|
+
# Reverse time in 24-hour format
|
|
26
|
+
nexusclock.nexusclock.backwards()._24h()
|
|
27
|
+
|
|
28
|
+
# Custom date/time
|
|
29
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")
|
|
30
|
+
|
|
31
|
+
# Custom with 24-hour format
|
|
32
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()
|
|
33
|
+
|
|
34
|
+
# Custom going backwards
|
|
35
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()
|
|
36
|
+
|
|
37
|
+
# Change timezone
|
|
38
|
+
nexusclock.nexusclock.changetz("America/New_York")
|
|
39
|
+
|
|
40
|
+
# Show help guide
|
|
41
|
+
nexusclock.nexusclock.help()
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Methods
|
|
45
|
+
|
|
46
|
+
| Method | Description | Example |
|
|
47
|
+
|--------|-------------|---------|
|
|
48
|
+
| `today()` | Current time (12-hour live) | `nexusclock.nexusclock.today()` |
|
|
49
|
+
| `today()._24h()` | Current time (24-hour live) | `nexusclock.nexusclock.today()._24h()` |
|
|
50
|
+
| `backwards()` | Time going backwards (12-hour) | `nexusclock.nexusclock.backwards()` |
|
|
51
|
+
| `backwards()._24h()` | Time going backwards (24-hour) | `nexusclock.nexusclock.backwards()._24h()` |
|
|
52
|
+
| `custom("YYYY-MM-DD HH:MM:SS")` | Custom date/time | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")` |
|
|
53
|
+
| `custom()._24h()` | Custom in 24-hour format | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()` |
|
|
54
|
+
| `custom().backwards()` | Custom going backwards | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()` |
|
|
55
|
+
| `custom().backwards()._24h()` | Custom backwards in 24-hour | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()._24h()` |
|
|
56
|
+
| `changetz("Timezone")` | Change timezone | `nexusclock.nexusclock.changetz("America/New_York")` |
|
|
57
|
+
| `changetz()._24h()` | Timezone with 24-hour format | `nexusclock.nexusclock.changetz("UTC")._24h()` |
|
|
58
|
+
| `changetz().backwards()` | Timezone going backwards | `nexusclock.nexusclock.changetz("Europe/London").backwards()` |
|
|
59
|
+
| `help()` | Show help guide | `nexusclock.nexusclock.help()` |
|
|
60
|
+
|
|
61
|
+
## Features
|
|
62
|
+
|
|
63
|
+
- ✅ **Live clock** with carriage return updates (no screen flicker)
|
|
64
|
+
- ✅ **12/24 hour formats** support
|
|
65
|
+
- ✅ **Reverse time** mode (time goes backwards)
|
|
66
|
+
- ✅ **Custom date/time** with validation
|
|
67
|
+
- ✅ **Timezone switching** with automatic offset
|
|
68
|
+
- ✅ **Automatic location detection** via IP geolocation
|
|
69
|
+
- ✅ **Ordinal suffixes** (st, nd, rd, th) for day numbers
|
|
70
|
+
- ✅ **Keyboard interrupt & EOF error handling** - no crashes!
|
|
71
|
+
- ✅ **Rich panel help guide** with beautiful formatting
|
|
72
|
+
- ✅ **Supports both class and instance methods**
|
|
73
|
+
|
|
74
|
+
## Example Output
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
The 9th of July, 2026, 4:52:38 PM, GMT+6 (Paltan, Bangladesh)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Requirements
|
|
81
|
+
|
|
82
|
+
- Python 3.7+
|
|
83
|
+
- rich >= 10.0.0
|
|
84
|
+
- python-dateutil >= 2.8.0
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
Copyright (c) 2026 Light Bulb Experiments
|
|
89
|
+
|
|
90
|
+
MIT License - see [LICENSE.txt](LICENSE.txt)
|
|
91
|
+
|
|
92
|
+
## Links
|
|
93
|
+
|
|
94
|
+
- **Homepage**: https://nexusclock.today
|
|
95
|
+
- **Target**: `nexusclock.nexusclock.today()`
|
|
96
|
+
- **Class**: `nexusclock`
|
|
97
|
+
- **Author**: Light Bulb Experiments
|
|
98
|
+
|
|
99
|
+
## Why NexusClock?
|
|
100
|
+
|
|
101
|
+
- 🚀 **Zero configuration** - Just import and use
|
|
102
|
+
- 🌍 **Location aware** - Automatically detects your timezone
|
|
103
|
+
- 🎯 **Simple API** - Chain methods for different formats
|
|
104
|
+
- ⚡ **Real-time updates** - Live clock with smooth updates
|
|
105
|
+
- 🛡️ **No crashes** - Handles all errors gracefully
|
|
106
|
+
- 📦 **Lightweight** - Minimal dependencies
|
|
107
|
+
|
|
108
|
+
## Contributing
|
|
109
|
+
|
|
110
|
+
Contributions are welcome! Please feel free to submit issues and pull requests.
|
|
111
|
+
|
|
112
|
+
## Support
|
|
113
|
+
|
|
114
|
+
For issues and feature requests, please open an issue on our GitHub repository.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
**Made with ❤️ by Light Bulb Experiments**
|
|
@@ -0,0 +1,455 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
NexusClock Core Module
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
import sys
|
|
7
|
+
import time
|
|
8
|
+
import os
|
|
9
|
+
import json
|
|
10
|
+
import urllib.request
|
|
11
|
+
from datetime import datetime, timedelta
|
|
12
|
+
from dateutil import tz
|
|
13
|
+
from rich.console import Console
|
|
14
|
+
from rich.panel import Panel
|
|
15
|
+
from rich.table import Table
|
|
16
|
+
from rich import print as rprint
|
|
17
|
+
|
|
18
|
+
console = Console()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class nexusclock:
|
|
22
|
+
"""Main NexusClock class - supports both instance and class methods"""
|
|
23
|
+
|
|
24
|
+
# Class-level shared instance
|
|
25
|
+
_instance = None
|
|
26
|
+
|
|
27
|
+
def __new__(cls):
|
|
28
|
+
"""Singleton pattern to reuse the same instance"""
|
|
29
|
+
if cls._instance is None:
|
|
30
|
+
cls._instance = super(nexusclock, cls).__new__(cls)
|
|
31
|
+
return cls._instance
|
|
32
|
+
|
|
33
|
+
def __init__(self):
|
|
34
|
+
# Only initialize once
|
|
35
|
+
if hasattr(self, '_initialized'):
|
|
36
|
+
return
|
|
37
|
+
|
|
38
|
+
self._initialized = True
|
|
39
|
+
self.running = True
|
|
40
|
+
self.reverse_mode = False
|
|
41
|
+
self.custom_time = None
|
|
42
|
+
self.use_24h = False
|
|
43
|
+
self.clock_thread = None
|
|
44
|
+
self._start_time = datetime.now()
|
|
45
|
+
self._custom_dt = None
|
|
46
|
+
self._first_run = True # Track first run for clean output
|
|
47
|
+
|
|
48
|
+
# Detect timezone from location
|
|
49
|
+
self.timezone = self._detect_timezone_from_location()
|
|
50
|
+
self.tz_offset = self._get_tz_offset()
|
|
51
|
+
self.location = self._get_location()
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def today(cls):
|
|
55
|
+
"""Class method - can be called as nexusclock.nexusclock.today()"""
|
|
56
|
+
instance = cls()
|
|
57
|
+
return instance._today()
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def backwards(cls):
|
|
61
|
+
"""Class method - can be called as nexusclock.nexusclock.backwards()"""
|
|
62
|
+
instance = cls()
|
|
63
|
+
return instance._backwards()
|
|
64
|
+
|
|
65
|
+
@classmethod
|
|
66
|
+
def _24h(cls):
|
|
67
|
+
"""Class method - can be called as nexusclock.nexusclock._24h()"""
|
|
68
|
+
instance = cls()
|
|
69
|
+
return instance.__24h()
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def custom(cls, datetime_str):
|
|
73
|
+
"""Class method - can be called as nexusclock.nexusclock.custom()"""
|
|
74
|
+
instance = cls()
|
|
75
|
+
return instance._custom(datetime_str)
|
|
76
|
+
|
|
77
|
+
@classmethod
|
|
78
|
+
def changetz(cls, new_tz="UTC"):
|
|
79
|
+
"""Class method - can be called as nexusclock.nexusclock.changetz()"""
|
|
80
|
+
instance = cls()
|
|
81
|
+
return instance._changetz(new_tz)
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def help(cls):
|
|
85
|
+
"""Class method - can be called as nexusclock.nexusclock.help()"""
|
|
86
|
+
instance = cls()
|
|
87
|
+
return instance._help()
|
|
88
|
+
|
|
89
|
+
def _get_location(self):
|
|
90
|
+
"""Get location from IP geolocation"""
|
|
91
|
+
try:
|
|
92
|
+
# Use free IP geolocation API
|
|
93
|
+
with urllib.request.urlopen('http://ip-api.com/json/', timeout=2) as response:
|
|
94
|
+
data = json.loads(response.read().decode())
|
|
95
|
+
if data['status'] == 'success':
|
|
96
|
+
return {
|
|
97
|
+
'city': data.get('city', 'Unknown'),
|
|
98
|
+
'country': data.get('country', 'Unknown'),
|
|
99
|
+
'timezone': data.get('timezone', 'UTC')
|
|
100
|
+
}
|
|
101
|
+
except:
|
|
102
|
+
pass
|
|
103
|
+
return {'city': 'Unknown', 'country': 'Unknown', 'timezone': 'UTC'}
|
|
104
|
+
|
|
105
|
+
def _detect_timezone_from_location(self):
|
|
106
|
+
"""Detect timezone based on IP geolocation"""
|
|
107
|
+
try:
|
|
108
|
+
# Try IP-based geolocation first
|
|
109
|
+
with urllib.request.urlopen('http://ip-api.com/json/', timeout=2) as response:
|
|
110
|
+
data = json.loads(response.read().decode())
|
|
111
|
+
if data['status'] == 'success':
|
|
112
|
+
tz_str = data.get('timezone', '')
|
|
113
|
+
if tz_str:
|
|
114
|
+
detected_tz = tz.gettz(tz_str)
|
|
115
|
+
if detected_tz:
|
|
116
|
+
return detected_tz
|
|
117
|
+
except:
|
|
118
|
+
pass
|
|
119
|
+
|
|
120
|
+
# Try environment variable
|
|
121
|
+
tz_env = os.environ.get('TZ')
|
|
122
|
+
if tz_env:
|
|
123
|
+
try:
|
|
124
|
+
return tz.gettz(tz_env)
|
|
125
|
+
except:
|
|
126
|
+
pass
|
|
127
|
+
|
|
128
|
+
# Try system local timezone
|
|
129
|
+
try:
|
|
130
|
+
local_tz = tz.tzlocal()
|
|
131
|
+
if local_tz and local_tz.utcoffset(datetime.now()):
|
|
132
|
+
return local_tz
|
|
133
|
+
except:
|
|
134
|
+
pass
|
|
135
|
+
|
|
136
|
+
# Try common timezones based on system
|
|
137
|
+
common_tz = self._guess_timezone_from_system()
|
|
138
|
+
if common_tz:
|
|
139
|
+
return common_tz
|
|
140
|
+
|
|
141
|
+
# Ultimate fallback to UTC
|
|
142
|
+
return tz.UTC
|
|
143
|
+
|
|
144
|
+
def _guess_timezone_from_system(self):
|
|
145
|
+
"""Guess timezone from system settings"""
|
|
146
|
+
try:
|
|
147
|
+
# Try to read /etc/timezone
|
|
148
|
+
with open('/etc/timezone', 'r') as f:
|
|
149
|
+
tz_str = f.read().strip()
|
|
150
|
+
if tz_str:
|
|
151
|
+
return tz.gettz(tz_str)
|
|
152
|
+
except:
|
|
153
|
+
pass
|
|
154
|
+
|
|
155
|
+
try:
|
|
156
|
+
# Try to read /etc/localtime
|
|
157
|
+
import subprocess
|
|
158
|
+
result = subprocess.run(['ls', '-l', '/etc/localtime'], capture_output=True, text=True)
|
|
159
|
+
if result.stdout:
|
|
160
|
+
parts = result.stdout.split('/')
|
|
161
|
+
if len(parts) > 2:
|
|
162
|
+
tz_str = '/'.join(parts[-2:]).strip()
|
|
163
|
+
return tz.gettz(tz_str)
|
|
164
|
+
except:
|
|
165
|
+
pass
|
|
166
|
+
|
|
167
|
+
return None
|
|
168
|
+
|
|
169
|
+
def _get_tz_offset(self):
|
|
170
|
+
"""Get current timezone offset"""
|
|
171
|
+
try:
|
|
172
|
+
now = datetime.now(self.timezone)
|
|
173
|
+
offset = now.utcoffset()
|
|
174
|
+
if offset:
|
|
175
|
+
hours = int(offset.total_seconds() / 3600)
|
|
176
|
+
minutes = abs(int((offset.total_seconds() % 3600) / 60))
|
|
177
|
+
if minutes > 0:
|
|
178
|
+
return f"GMT{'+' if hours >= 0 else ''}{hours}:{minutes:02d}"
|
|
179
|
+
return f"GMT{'+' if hours >= 0 else ''}{hours}"
|
|
180
|
+
except:
|
|
181
|
+
pass
|
|
182
|
+
return "GMT+0"
|
|
183
|
+
|
|
184
|
+
def _get_ordinal(self, n):
|
|
185
|
+
"""Get ordinal suffix for day numbers"""
|
|
186
|
+
if 4 <= n <= 20 or 24 <= n <= 30:
|
|
187
|
+
return "th"
|
|
188
|
+
else:
|
|
189
|
+
return {1: "st", 2: "nd", 3: "rd"}.get(n % 10, "th")
|
|
190
|
+
|
|
191
|
+
def _format_output(self, dt, use_24h=False):
|
|
192
|
+
"""Format the time output with proper ordinal and timezone"""
|
|
193
|
+
day = dt.day
|
|
194
|
+
ordinal = self._get_ordinal(day)
|
|
195
|
+
month = dt.strftime("%B")
|
|
196
|
+
year = dt.year
|
|
197
|
+
|
|
198
|
+
if use_24h:
|
|
199
|
+
time_str = dt.strftime("%H:%M:%S")
|
|
200
|
+
else:
|
|
201
|
+
time_str = dt.strftime("%I:%M:%S %p").lstrip("0")
|
|
202
|
+
|
|
203
|
+
# Get live timezone with location
|
|
204
|
+
tz_str = self._get_tz_offset()
|
|
205
|
+
location_str = ""
|
|
206
|
+
if hasattr(self, 'location') and self.location:
|
|
207
|
+
loc = self.location
|
|
208
|
+
if loc['city'] != 'Unknown':
|
|
209
|
+
location_str = f" ({loc['city']}, {loc['country']})"
|
|
210
|
+
|
|
211
|
+
return f"The {day}{ordinal} of {month}, {year}, {time_str}, {tz_str}{location_str}"
|
|
212
|
+
|
|
213
|
+
def _live_clock(self, custom_dt=None, use_24h=False, reverse=False):
|
|
214
|
+
"""Live clock display with carriage returns - CLEAN OUTPUT"""
|
|
215
|
+
try:
|
|
216
|
+
# Clear any previous output and start fresh
|
|
217
|
+
sys.stdout.write('\r' + ' ' * 120 + '\r')
|
|
218
|
+
sys.stdout.flush()
|
|
219
|
+
|
|
220
|
+
while self.running:
|
|
221
|
+
try:
|
|
222
|
+
if custom_dt:
|
|
223
|
+
# Use custom date/time as base
|
|
224
|
+
if reverse:
|
|
225
|
+
elapsed = (datetime.now() - self._start_time).total_seconds()
|
|
226
|
+
current_time = custom_dt - timedelta(seconds=elapsed)
|
|
227
|
+
else:
|
|
228
|
+
elapsed = (datetime.now() - self._start_time).total_seconds()
|
|
229
|
+
current_time = custom_dt + timedelta(seconds=elapsed)
|
|
230
|
+
else:
|
|
231
|
+
if reverse:
|
|
232
|
+
elapsed = (datetime.now() - self._start_time).total_seconds()
|
|
233
|
+
current_time = datetime.now(self.timezone) - timedelta(seconds=elapsed)
|
|
234
|
+
else:
|
|
235
|
+
current_time = datetime.now(self.timezone)
|
|
236
|
+
|
|
237
|
+
# Format output
|
|
238
|
+
output = self._format_output(current_time, use_24h)
|
|
239
|
+
|
|
240
|
+
# Single clean line with carriage return - NO extra newlines
|
|
241
|
+
sys.stdout.write('\r' + output)
|
|
242
|
+
sys.stdout.flush()
|
|
243
|
+
|
|
244
|
+
time.sleep(1)
|
|
245
|
+
|
|
246
|
+
except KeyboardInterrupt:
|
|
247
|
+
self.running = False
|
|
248
|
+
# Print newline after interrupt for clean prompt
|
|
249
|
+
print()
|
|
250
|
+
break
|
|
251
|
+
except EOFError:
|
|
252
|
+
self.running = False
|
|
253
|
+
print()
|
|
254
|
+
break
|
|
255
|
+
except Exception:
|
|
256
|
+
# Silent error handling - no crashes
|
|
257
|
+
pass
|
|
258
|
+
|
|
259
|
+
except KeyboardInterrupt:
|
|
260
|
+
self.running = False
|
|
261
|
+
print()
|
|
262
|
+
except EOFError:
|
|
263
|
+
self.running = False
|
|
264
|
+
print()
|
|
265
|
+
|
|
266
|
+
def _today(self):
|
|
267
|
+
"""Instance method for today()"""
|
|
268
|
+
self.use_24h = False
|
|
269
|
+
self.reverse_mode = False
|
|
270
|
+
self._start_time = datetime.now()
|
|
271
|
+
self.running = True
|
|
272
|
+
|
|
273
|
+
try:
|
|
274
|
+
self._live_clock(use_24h=False, reverse=False)
|
|
275
|
+
except KeyboardInterrupt:
|
|
276
|
+
self.running = False
|
|
277
|
+
# Already handled in _live_clock
|
|
278
|
+
except EOFError:
|
|
279
|
+
self.running = False
|
|
280
|
+
# Already handled in _live_clock
|
|
281
|
+
|
|
282
|
+
return self
|
|
283
|
+
|
|
284
|
+
def __24h(self):
|
|
285
|
+
"""Instance method for 24h format"""
|
|
286
|
+
self.use_24h = True
|
|
287
|
+
return self
|
|
288
|
+
|
|
289
|
+
def _backwards(self):
|
|
290
|
+
"""Instance method for backwards()"""
|
|
291
|
+
self.reverse_mode = True
|
|
292
|
+
self._start_time = datetime.now()
|
|
293
|
+
self.running = True
|
|
294
|
+
|
|
295
|
+
try:
|
|
296
|
+
self._live_clock(use_24h=self.use_24h, reverse=True)
|
|
297
|
+
except KeyboardInterrupt:
|
|
298
|
+
self.running = False
|
|
299
|
+
except EOFError:
|
|
300
|
+
self.running = False
|
|
301
|
+
|
|
302
|
+
return self
|
|
303
|
+
|
|
304
|
+
def _custom(self, datetime_str):
|
|
305
|
+
"""Instance method for custom()"""
|
|
306
|
+
try:
|
|
307
|
+
# Parse custom datetime
|
|
308
|
+
custom_dt = datetime.strptime(datetime_str, "%Y-%m-%d %H:%M:%S")
|
|
309
|
+
self._custom_dt = custom_dt
|
|
310
|
+
self._start_time = datetime.now()
|
|
311
|
+
self.running = True
|
|
312
|
+
|
|
313
|
+
# Apply timezone
|
|
314
|
+
custom_dt = custom_dt.replace(tzinfo=self.timezone)
|
|
315
|
+
|
|
316
|
+
try:
|
|
317
|
+
self._live_clock(custom_dt=custom_dt, use_24h=self.use_24h, reverse=self.reverse_mode)
|
|
318
|
+
except KeyboardInterrupt:
|
|
319
|
+
self.running = False
|
|
320
|
+
except EOFError:
|
|
321
|
+
self.running = False
|
|
322
|
+
|
|
323
|
+
except ValueError as e:
|
|
324
|
+
print(f"❌ Invalid datetime format. Use YYYY-MM-DD HH:MM:SS")
|
|
325
|
+
print(f"Error: {e}")
|
|
326
|
+
|
|
327
|
+
return self
|
|
328
|
+
|
|
329
|
+
def _changetz(self, new_tz="UTC"):
|
|
330
|
+
"""Instance method for changetz()"""
|
|
331
|
+
try:
|
|
332
|
+
if new_tz == "UTC":
|
|
333
|
+
self.timezone = tz.UTC
|
|
334
|
+
else:
|
|
335
|
+
self.timezone = tz.gettz(new_tz)
|
|
336
|
+
|
|
337
|
+
if not self.timezone:
|
|
338
|
+
self.timezone = tz.tzlocal()
|
|
339
|
+
print(f"⚠️ Invalid timezone, using local timezone")
|
|
340
|
+
|
|
341
|
+
self.tz_offset = self._get_tz_offset()
|
|
342
|
+
print(f"✅ Timezone changed to: {new_tz}")
|
|
343
|
+
|
|
344
|
+
# Restart clock with new timezone
|
|
345
|
+
self._start_time = datetime.now()
|
|
346
|
+
self.running = True
|
|
347
|
+
|
|
348
|
+
try:
|
|
349
|
+
self._live_clock(use_24h=self.use_24h, reverse=self.reverse_mode)
|
|
350
|
+
except KeyboardInterrupt:
|
|
351
|
+
self.running = False
|
|
352
|
+
except EOFError:
|
|
353
|
+
self.running = False
|
|
354
|
+
|
|
355
|
+
except Exception as e:
|
|
356
|
+
print(f"❌ Error changing timezone: {e}")
|
|
357
|
+
self.timezone = tz.tzlocal()
|
|
358
|
+
|
|
359
|
+
return self
|
|
360
|
+
|
|
361
|
+
def _help(self):
|
|
362
|
+
"""Instance method for help()"""
|
|
363
|
+
console = Console()
|
|
364
|
+
|
|
365
|
+
# Show detected location and timezone
|
|
366
|
+
if hasattr(self, 'location') and self.location:
|
|
367
|
+
loc = self.location
|
|
368
|
+
if loc['city'] != 'Unknown':
|
|
369
|
+
console.print(Panel(
|
|
370
|
+
f"[bold green]📍 Location:[/bold green] {loc['city']}, {loc['country']}\n"
|
|
371
|
+
f"[bold cyan]🕐 Timezone:[/bold cyan] {self._get_tz_offset()}",
|
|
372
|
+
title="🌍 Detected Location",
|
|
373
|
+
border_style="blue"
|
|
374
|
+
))
|
|
375
|
+
|
|
376
|
+
# Create help table
|
|
377
|
+
table = Table(show_header=True, header_style="bold cyan")
|
|
378
|
+
table.add_column("Method", style="bold green")
|
|
379
|
+
table.add_column("Description", style="white")
|
|
380
|
+
table.add_column("Example", style="yellow")
|
|
381
|
+
|
|
382
|
+
table.add_row(
|
|
383
|
+
"today()",
|
|
384
|
+
"Current time in 12-hour format (live)",
|
|
385
|
+
"nexusclock.nexusclock.today()"
|
|
386
|
+
)
|
|
387
|
+
table.add_row(
|
|
388
|
+
"today()._24h()",
|
|
389
|
+
"Current time in 24-hour format",
|
|
390
|
+
"nexusclock.nexusclock.today()._24h()"
|
|
391
|
+
)
|
|
392
|
+
table.add_row(
|
|
393
|
+
"backwards()",
|
|
394
|
+
"Time going backwards (12-hour)",
|
|
395
|
+
"nexusclock.nexusclock.backwards()"
|
|
396
|
+
)
|
|
397
|
+
table.add_row(
|
|
398
|
+
"backwards()._24h()",
|
|
399
|
+
"Time going backwards (24-hour)",
|
|
400
|
+
"nexusclock.nexusclock.backwards()._24h()"
|
|
401
|
+
)
|
|
402
|
+
table.add_row(
|
|
403
|
+
'custom("YYYY-MM-DD HH:MM:SS")',
|
|
404
|
+
"Custom date/time",
|
|
405
|
+
'nexusclock.nexusclock.custom("2026-07-09 14:30:00")'
|
|
406
|
+
)
|
|
407
|
+
table.add_row(
|
|
408
|
+
'custom()._24h()',
|
|
409
|
+
"Custom date/time in 24-hour",
|
|
410
|
+
'nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()'
|
|
411
|
+
)
|
|
412
|
+
table.add_row(
|
|
413
|
+
'custom().backwards()',
|
|
414
|
+
"Custom date/time going backwards",
|
|
415
|
+
'nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()'
|
|
416
|
+
)
|
|
417
|
+
table.add_row(
|
|
418
|
+
'changetz("Timezone")',
|
|
419
|
+
"Change timezone",
|
|
420
|
+
'nexusclock.nexusclock.changetz("America/New_York")'
|
|
421
|
+
)
|
|
422
|
+
table.add_row(
|
|
423
|
+
"help()",
|
|
424
|
+
"Show this help guide",
|
|
425
|
+
"nexusclock.nexusclock.help()"
|
|
426
|
+
)
|
|
427
|
+
|
|
428
|
+
# Display help panels
|
|
429
|
+
console.print(Panel.fit(
|
|
430
|
+
"[bold cyan]NexusClock Help Guide[/bold cyan]",
|
|
431
|
+
border_style="cyan"
|
|
432
|
+
))
|
|
433
|
+
|
|
434
|
+
console.print(Panel(
|
|
435
|
+
"[bold yellow]Features:[/bold yellow]\n"
|
|
436
|
+
"• Live clock with carriage return updates\n"
|
|
437
|
+
"• 12/24 hour formats\n"
|
|
438
|
+
"• Reverse time mode\n"
|
|
439
|
+
"• Custom date/time support\n"
|
|
440
|
+
"• Timezone switching\n"
|
|
441
|
+
"• Ordinal suffixes (st, nd, rd, th)\n"
|
|
442
|
+
"• Keyboard interrupt & EOF error handling\n"
|
|
443
|
+
"• No crashes guaranteed",
|
|
444
|
+
title="✨ Features",
|
|
445
|
+
border_style="green"
|
|
446
|
+
))
|
|
447
|
+
|
|
448
|
+
console.print(table)
|
|
449
|
+
|
|
450
|
+
console.print(Panel(
|
|
451
|
+
"[bold green]Press Ctrl+C to stop any running clock[/bold green]",
|
|
452
|
+
border_style="yellow"
|
|
453
|
+
))
|
|
454
|
+
|
|
455
|
+
return self
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: nexusclock
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A powerful live clock library with timezone support and reverse time
|
|
5
|
+
Home-page: https://nexusclock.today
|
|
6
|
+
Author: Light Bulb Experiments
|
|
7
|
+
Author-email: lightbulb@example.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE.txt
|
|
15
|
+
Requires-Dist: rich>=10.0.0
|
|
16
|
+
Requires-Dist: python-dateutil>=2.8.0
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: classifier
|
|
20
|
+
Dynamic: description
|
|
21
|
+
Dynamic: description-content-type
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license
|
|
24
|
+
Dynamic: license-file
|
|
25
|
+
Dynamic: requires-dist
|
|
26
|
+
Dynamic: requires-python
|
|
27
|
+
Dynamic: summary
|
|
28
|
+
|
|
29
|
+
# NexusClock
|
|
30
|
+
|
|
31
|
+
A powerful live clock library with timezone support, custom dates, and reverse time functionality.
|
|
32
|
+
|
|
33
|
+
## How to install
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
python -m pip install nexusclock
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Quick Start
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from nexusclock import nexusclock
|
|
43
|
+
|
|
44
|
+
# Current time (12-hour format) - Just works!
|
|
45
|
+
nexusclock.nexusclock.today()
|
|
46
|
+
|
|
47
|
+
# Current time (24-hour format)
|
|
48
|
+
nexusclock.nexusclock.today()._24h()
|
|
49
|
+
|
|
50
|
+
# Time going backwards (reverse)
|
|
51
|
+
nexusclock.nexusclock.backwards()
|
|
52
|
+
|
|
53
|
+
# Reverse time in 24-hour format
|
|
54
|
+
nexusclock.nexusclock.backwards()._24h()
|
|
55
|
+
|
|
56
|
+
# Custom date/time
|
|
57
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")
|
|
58
|
+
|
|
59
|
+
# Custom with 24-hour format
|
|
60
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()
|
|
61
|
+
|
|
62
|
+
# Custom going backwards
|
|
63
|
+
nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()
|
|
64
|
+
|
|
65
|
+
# Change timezone
|
|
66
|
+
nexusclock.nexusclock.changetz("America/New_York")
|
|
67
|
+
|
|
68
|
+
# Show help guide
|
|
69
|
+
nexusclock.nexusclock.help()
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Methods
|
|
73
|
+
|
|
74
|
+
| Method | Description | Example |
|
|
75
|
+
|--------|-------------|---------|
|
|
76
|
+
| `today()` | Current time (12-hour live) | `nexusclock.nexusclock.today()` |
|
|
77
|
+
| `today()._24h()` | Current time (24-hour live) | `nexusclock.nexusclock.today()._24h()` |
|
|
78
|
+
| `backwards()` | Time going backwards (12-hour) | `nexusclock.nexusclock.backwards()` |
|
|
79
|
+
| `backwards()._24h()` | Time going backwards (24-hour) | `nexusclock.nexusclock.backwards()._24h()` |
|
|
80
|
+
| `custom("YYYY-MM-DD HH:MM:SS")` | Custom date/time | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")` |
|
|
81
|
+
| `custom()._24h()` | Custom in 24-hour format | `nexusclock.nexusclock.custom("2026-07-09 14:30:00")._24h()` |
|
|
82
|
+
| `custom().backwards()` | Custom going backwards | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()` |
|
|
83
|
+
| `custom().backwards()._24h()` | Custom backwards in 24-hour | `nexusclock.nexusclock.custom("2026-07-09 14:30:00").backwards()._24h()` |
|
|
84
|
+
| `changetz("Timezone")` | Change timezone | `nexusclock.nexusclock.changetz("America/New_York")` |
|
|
85
|
+
| `changetz()._24h()` | Timezone with 24-hour format | `nexusclock.nexusclock.changetz("UTC")._24h()` |
|
|
86
|
+
| `changetz().backwards()` | Timezone going backwards | `nexusclock.nexusclock.changetz("Europe/London").backwards()` |
|
|
87
|
+
| `help()` | Show help guide | `nexusclock.nexusclock.help()` |
|
|
88
|
+
|
|
89
|
+
## Features
|
|
90
|
+
|
|
91
|
+
- ✅ **Live clock** with carriage return updates (no screen flicker)
|
|
92
|
+
- ✅ **12/24 hour formats** support
|
|
93
|
+
- ✅ **Reverse time** mode (time goes backwards)
|
|
94
|
+
- ✅ **Custom date/time** with validation
|
|
95
|
+
- ✅ **Timezone switching** with automatic offset
|
|
96
|
+
- ✅ **Automatic location detection** via IP geolocation
|
|
97
|
+
- ✅ **Ordinal suffixes** (st, nd, rd, th) for day numbers
|
|
98
|
+
- ✅ **Keyboard interrupt & EOF error handling** - no crashes!
|
|
99
|
+
- ✅ **Rich panel help guide** with beautiful formatting
|
|
100
|
+
- ✅ **Supports both class and instance methods**
|
|
101
|
+
|
|
102
|
+
## Example Output
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
The 9th of July, 2026, 4:52:38 PM, GMT+6 (Paltan, Bangladesh)
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Requirements
|
|
109
|
+
|
|
110
|
+
- Python 3.7+
|
|
111
|
+
- rich >= 10.0.0
|
|
112
|
+
- python-dateutil >= 2.8.0
|
|
113
|
+
|
|
114
|
+
## License
|
|
115
|
+
|
|
116
|
+
Copyright (c) 2026 Light Bulb Experiments
|
|
117
|
+
|
|
118
|
+
MIT License - see [LICENSE.txt](LICENSE.txt)
|
|
119
|
+
|
|
120
|
+
## Links
|
|
121
|
+
|
|
122
|
+
- **Homepage**: https://nexusclock.today
|
|
123
|
+
- **Target**: `nexusclock.nexusclock.today()`
|
|
124
|
+
- **Class**: `nexusclock`
|
|
125
|
+
- **Author**: Light Bulb Experiments
|
|
126
|
+
|
|
127
|
+
## Why NexusClock?
|
|
128
|
+
|
|
129
|
+
- 🚀 **Zero configuration** - Just import and use
|
|
130
|
+
- 🌍 **Location aware** - Automatically detects your timezone
|
|
131
|
+
- 🎯 **Simple API** - Chain methods for different formats
|
|
132
|
+
- ⚡ **Real-time updates** - Live clock with smooth updates
|
|
133
|
+
- 🛡️ **No crashes** - Handles all errors gracefully
|
|
134
|
+
- 📦 **Lightweight** - Minimal dependencies
|
|
135
|
+
|
|
136
|
+
## Contributing
|
|
137
|
+
|
|
138
|
+
Contributions are welcome! Please feel free to submit issues and pull requests.
|
|
139
|
+
|
|
140
|
+
## Support
|
|
141
|
+
|
|
142
|
+
For issues and feature requests, please open an issue on our GitHub repository.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
**Made with ❤️ by Light Bulb Experiments**
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE.txt
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
setup.py
|
|
5
|
+
nexusclock/__init__.py
|
|
6
|
+
nexusclock/nexusclock.py
|
|
7
|
+
nexusclock.egg-info/PKG-INFO
|
|
8
|
+
nexusclock.egg-info/SOURCES.txt
|
|
9
|
+
nexusclock.egg-info/dependency_links.txt
|
|
10
|
+
nexusclock.egg-info/requires.txt
|
|
11
|
+
nexusclock.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
nexusclock
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
from setuptools import setup, find_packages
|
|
3
|
+
|
|
4
|
+
setup(
|
|
5
|
+
name="nexusclock",
|
|
6
|
+
version="1.0.0",
|
|
7
|
+
author="Light Bulb Experiments",
|
|
8
|
+
author_email="lightbulb@example.com",
|
|
9
|
+
description="A powerful live clock library with timezone support and reverse time",
|
|
10
|
+
long_description=open("README.md").read(),
|
|
11
|
+
long_description_content_type="text/markdown",
|
|
12
|
+
url="https://nexusclock.today",
|
|
13
|
+
license="MIT",
|
|
14
|
+
packages=find_packages(),
|
|
15
|
+
python_requires=">=3.7",
|
|
16
|
+
install_requires=[
|
|
17
|
+
"rich>=10.0.0",
|
|
18
|
+
"python-dateutil>=2.8.0",
|
|
19
|
+
],
|
|
20
|
+
classifiers=[
|
|
21
|
+
"Programming Language :: Python :: 3",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
],
|
|
25
|
+
)
|