clox 0.7__tar.gz → 0.8__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.
Potentially problematic release.
This version of clox might be problematic. Click here for more details.
- {clox-0.7 → clox-0.8}/CHANGELOG.md +11 -1
- clox-0.8/COUNTRIES.md +252 -0
- {clox-0.7 → clox-0.8}/PKG-INFO +33 -9
- {clox-0.7 → clox-0.8}/README.md +20 -6
- {clox-0.7 → clox-0.8}/SECURITY.md +2 -2
- {clox-0.7 → clox-0.8}/clox/functions.py +58 -10
- {clox-0.7 → clox-0.8}/clox/params.py +4 -3
- {clox-0.7 → clox-0.8}/clox.egg-info/PKG-INFO +33 -9
- {clox-0.7 → clox-0.8}/clox.egg-info/SOURCES.txt +1 -0
- {clox-0.7 → clox-0.8}/setup.py +2 -2
- {clox-0.7 → clox-0.8}/AUTHORS.md +0 -0
- {clox-0.7 → clox-0.8}/FACES.md +0 -0
- {clox-0.7 → clox-0.8}/LICENSE +0 -0
- {clox-0.7 → clox-0.8}/MANIFEST.in +0 -0
- {clox-0.7 → clox-0.8}/TIMEZONES.md +0 -0
- {clox-0.7 → clox-0.8}/clox/__init__.py +0 -0
- {clox-0.7 → clox-0.8}/clox/__main__.py +0 -0
- {clox-0.7 → clox-0.8}/clox/jcalendar.py +0 -0
- {clox-0.7 → clox-0.8}/clox.egg-info/dependency_links.txt +0 -0
- {clox-0.7 → clox-0.8}/clox.egg-info/entry_points.txt +0 -0
- {clox-0.7 → clox-0.8}/clox.egg-info/requires.txt +0 -0
- {clox-0.7 → clox-0.8}/clox.egg-info/top_level.txt +0 -0
- {clox-0.7 → clox-0.8}/dev-requirements.txt +0 -0
- {clox-0.7 → clox-0.8}/requirements.txt +0 -0
- {clox-0.7 → clox-0.8}/setup.cfg +0 -0
|
@@ -5,6 +5,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
|
+
## [0.8] - 2025-03-16
|
|
9
|
+
### Added
|
|
10
|
+
- `--country` argument
|
|
11
|
+
- `--countries-list` argument
|
|
12
|
+
- `COUNTRIES.md`
|
|
13
|
+
### Changed
|
|
14
|
+
- Input case sensitivity bug fixed
|
|
15
|
+
- Test system modified
|
|
16
|
+
- `README.md` updated
|
|
8
17
|
## [0.7] - 2025-03-06
|
|
9
18
|
### Added
|
|
10
19
|
- Jalali calendar
|
|
@@ -49,7 +58,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
49
58
|
- `TIMEZONES.md`
|
|
50
59
|
- `FACES.md`
|
|
51
60
|
|
|
52
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.
|
|
61
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.8...dev
|
|
62
|
+
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
|
53
63
|
[0.7]: https://github.com/sepandhaghighi/clox/compare/v0.6...v0.7
|
|
54
64
|
[0.6]: https://github.com/sepandhaghighi/clox/compare/v0.5...v0.6
|
|
55
65
|
[0.5]: https://github.com/sepandhaghighi/clox/compare/v0.4...v0.5
|
clox-0.8/COUNTRIES.md
ADDED
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Countries List
|
|
2
|
+
|
|
3
|
+
**Last Update: 2025-03-11**
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
1. AD - Andorra
|
|
7
|
+
2. AE - United Arab Emirates
|
|
8
|
+
3. AF - Afghanistan
|
|
9
|
+
4. AG - Antigua & Barbuda
|
|
10
|
+
5. AI - Anguilla
|
|
11
|
+
6. AL - Albania
|
|
12
|
+
7. AM - Armenia
|
|
13
|
+
8. AO - Angola
|
|
14
|
+
9. AQ - Antarctica
|
|
15
|
+
10. AR - Argentina
|
|
16
|
+
11. AS - Samoa (American)
|
|
17
|
+
12. AT - Austria
|
|
18
|
+
13. AU - Australia
|
|
19
|
+
14. AW - Aruba
|
|
20
|
+
15. AX - Åland Islands
|
|
21
|
+
16. AZ - Azerbaijan
|
|
22
|
+
17. BA - Bosnia & Herzegovina
|
|
23
|
+
18. BB - Barbados
|
|
24
|
+
19. BD - Bangladesh
|
|
25
|
+
20. BE - Belgium
|
|
26
|
+
21. BF - Burkina Faso
|
|
27
|
+
22. BG - Bulgaria
|
|
28
|
+
23. BH - Bahrain
|
|
29
|
+
24. BI - Burundi
|
|
30
|
+
25. BJ - Benin
|
|
31
|
+
26. BL - St Barthelemy
|
|
32
|
+
27. BM - Bermuda
|
|
33
|
+
28. BN - Brunei
|
|
34
|
+
29. BO - Bolivia
|
|
35
|
+
30. BQ - Caribbean NL
|
|
36
|
+
31. BR - Brazil
|
|
37
|
+
32. BS - Bahamas
|
|
38
|
+
33. BT - Bhutan
|
|
39
|
+
34. BW - Botswana
|
|
40
|
+
35. BY - Belarus
|
|
41
|
+
36. BZ - Belize
|
|
42
|
+
37. CA - Canada
|
|
43
|
+
38. CC - Cocos (Keeling) Islands
|
|
44
|
+
39. CD - Congo (Dem. Rep.)
|
|
45
|
+
40. CF - Central African Rep.
|
|
46
|
+
41. CG - Congo (Rep.)
|
|
47
|
+
42. CH - Switzerland
|
|
48
|
+
43. CI - Côte d'Ivoire
|
|
49
|
+
44. CK - Cook Islands
|
|
50
|
+
45. CL - Chile
|
|
51
|
+
46. CM - Cameroon
|
|
52
|
+
47. CN - China
|
|
53
|
+
48. CO - Colombia
|
|
54
|
+
49. CR - Costa Rica
|
|
55
|
+
50. CU - Cuba
|
|
56
|
+
51. CV - Cape Verde
|
|
57
|
+
52. CW - Curaçao
|
|
58
|
+
53. CX - Christmas Island
|
|
59
|
+
54. CY - Cyprus
|
|
60
|
+
55. CZ - Czech Republic
|
|
61
|
+
56. DE - Germany
|
|
62
|
+
57. DJ - Djibouti
|
|
63
|
+
58. DK - Denmark
|
|
64
|
+
59. DM - Dominica
|
|
65
|
+
60. DO - Dominican Republic
|
|
66
|
+
61. DZ - Algeria
|
|
67
|
+
62. EC - Ecuador
|
|
68
|
+
63. EE - Estonia
|
|
69
|
+
64. EG - Egypt
|
|
70
|
+
65. EH - Western Sahara
|
|
71
|
+
66. ER - Eritrea
|
|
72
|
+
67. ES - Spain
|
|
73
|
+
68. ET - Ethiopia
|
|
74
|
+
69. FI - Finland
|
|
75
|
+
70. FJ - Fiji
|
|
76
|
+
71. FK - Falkland Islands
|
|
77
|
+
72. FM - Micronesia
|
|
78
|
+
73. FO - Faroe Islands
|
|
79
|
+
74. FR - France
|
|
80
|
+
75. GA - Gabon
|
|
81
|
+
76. GB - Britain (UK)
|
|
82
|
+
77. GD - Grenada
|
|
83
|
+
78. GE - Georgia
|
|
84
|
+
79. GF - French Guiana
|
|
85
|
+
80. GG - Guernsey
|
|
86
|
+
81. GH - Ghana
|
|
87
|
+
82. GI - Gibraltar
|
|
88
|
+
83. GL - Greenland
|
|
89
|
+
84. GM - Gambia
|
|
90
|
+
85. GN - Guinea
|
|
91
|
+
86. GP - Guadeloupe
|
|
92
|
+
87. GQ - Equatorial Guinea
|
|
93
|
+
88. GR - Greece
|
|
94
|
+
89. GS - South Georgia & the South Sandwich Islands
|
|
95
|
+
90. GT - Guatemala
|
|
96
|
+
91. GU - Guam
|
|
97
|
+
92. GW - Guinea-Bissau
|
|
98
|
+
93. GY - Guyana
|
|
99
|
+
94. HK - Hong Kong
|
|
100
|
+
95. HN - Honduras
|
|
101
|
+
96. HR - Croatia
|
|
102
|
+
97. HT - Haiti
|
|
103
|
+
98. HU - Hungary
|
|
104
|
+
99. ID - Indonesia
|
|
105
|
+
100. IE - Ireland
|
|
106
|
+
101. IL - Israel
|
|
107
|
+
102. IM - Isle of Man
|
|
108
|
+
103. IN - India
|
|
109
|
+
104. IO - British Indian Ocean Territory
|
|
110
|
+
105. IQ - Iraq
|
|
111
|
+
106. IR - Iran
|
|
112
|
+
107. IS - Iceland
|
|
113
|
+
108. IT - Italy
|
|
114
|
+
109. JE - Jersey
|
|
115
|
+
110. JM - Jamaica
|
|
116
|
+
111. JO - Jordan
|
|
117
|
+
112. JP - Japan
|
|
118
|
+
113. KE - Kenya
|
|
119
|
+
114. KG - Kyrgyzstan
|
|
120
|
+
115. KH - Cambodia
|
|
121
|
+
116. KI - Kiribati
|
|
122
|
+
117. KM - Comoros
|
|
123
|
+
118. KN - St Kitts & Nevis
|
|
124
|
+
119. KP - Korea (North)
|
|
125
|
+
120. KR - Korea (South)
|
|
126
|
+
121. KW - Kuwait
|
|
127
|
+
122. KY - Cayman Islands
|
|
128
|
+
123. KZ - Kazakhstan
|
|
129
|
+
124. LA - Laos
|
|
130
|
+
125. LB - Lebanon
|
|
131
|
+
126. LC - St Lucia
|
|
132
|
+
127. LI - Liechtenstein
|
|
133
|
+
128. LK - Sri Lanka
|
|
134
|
+
129. LR - Liberia
|
|
135
|
+
130. LS - Lesotho
|
|
136
|
+
131. LT - Lithuania
|
|
137
|
+
132. LU - Luxembourg
|
|
138
|
+
133. LV - Latvia
|
|
139
|
+
134. LY - Libya
|
|
140
|
+
135. MA - Morocco
|
|
141
|
+
136. MC - Monaco
|
|
142
|
+
137. MD - Moldova
|
|
143
|
+
138. ME - Montenegro
|
|
144
|
+
139. MF - St Martin (French)
|
|
145
|
+
140. MG - Madagascar
|
|
146
|
+
141. MH - Marshall Islands
|
|
147
|
+
142. MK - North Macedonia
|
|
148
|
+
143. ML - Mali
|
|
149
|
+
144. MM - Myanmar (Burma)
|
|
150
|
+
145. MN - Mongolia
|
|
151
|
+
146. MO - Macau
|
|
152
|
+
147. MP - Northern Mariana Islands
|
|
153
|
+
148. MQ - Martinique
|
|
154
|
+
149. MR - Mauritania
|
|
155
|
+
150. MS - Montserrat
|
|
156
|
+
151. MT - Malta
|
|
157
|
+
152. MU - Mauritius
|
|
158
|
+
153. MV - Maldives
|
|
159
|
+
154. MW - Malawi
|
|
160
|
+
155. MX - Mexico
|
|
161
|
+
156. MY - Malaysia
|
|
162
|
+
157. MZ - Mozambique
|
|
163
|
+
158. NA - Namibia
|
|
164
|
+
159. NC - New Caledonia
|
|
165
|
+
160. NE - Niger
|
|
166
|
+
161. NF - Norfolk Island
|
|
167
|
+
162. NG - Nigeria
|
|
168
|
+
163. NI - Nicaragua
|
|
169
|
+
164. NL - Netherlands
|
|
170
|
+
165. NO - Norway
|
|
171
|
+
166. NP - Nepal
|
|
172
|
+
167. NR - Nauru
|
|
173
|
+
168. NU - Niue
|
|
174
|
+
169. NZ - New Zealand
|
|
175
|
+
170. OM - Oman
|
|
176
|
+
171. PA - Panama
|
|
177
|
+
172. PE - Peru
|
|
178
|
+
173. PF - French Polynesia
|
|
179
|
+
174. PG - Papua New Guinea
|
|
180
|
+
175. PH - Philippines
|
|
181
|
+
176. PK - Pakistan
|
|
182
|
+
177. PL - Poland
|
|
183
|
+
178. PM - St Pierre & Miquelon
|
|
184
|
+
179. PN - Pitcairn
|
|
185
|
+
180. PR - Puerto Rico
|
|
186
|
+
181. PS - Palestine
|
|
187
|
+
182. PT - Portugal
|
|
188
|
+
183. PW - Palau
|
|
189
|
+
184. PY - Paraguay
|
|
190
|
+
185. QA - Qatar
|
|
191
|
+
186. RE - Réunion
|
|
192
|
+
187. RO - Romania
|
|
193
|
+
188. RS - Serbia
|
|
194
|
+
189. RU - Russia
|
|
195
|
+
190. RW - Rwanda
|
|
196
|
+
191. SA - Saudi Arabia
|
|
197
|
+
192. SB - Solomon Islands
|
|
198
|
+
193. SC - Seychelles
|
|
199
|
+
194. SD - Sudan
|
|
200
|
+
195. SE - Sweden
|
|
201
|
+
196. SG - Singapore
|
|
202
|
+
197. SH - St Helena
|
|
203
|
+
198. SI - Slovenia
|
|
204
|
+
199. SJ - Svalbard & Jan Mayen
|
|
205
|
+
200. SK - Slovakia
|
|
206
|
+
201. SL - Sierra Leone
|
|
207
|
+
202. SM - San Marino
|
|
208
|
+
203. SN - Senegal
|
|
209
|
+
204. SO - Somalia
|
|
210
|
+
205. SR - Suriname
|
|
211
|
+
206. SS - South Sudan
|
|
212
|
+
207. ST - Sao Tome & Principe
|
|
213
|
+
208. SV - El Salvador
|
|
214
|
+
209. SX - St Maarten (Dutch)
|
|
215
|
+
210. SY - Syria
|
|
216
|
+
211. SZ - Eswatini (Swaziland)
|
|
217
|
+
212. TC - Turks & Caicos Is
|
|
218
|
+
213. TD - Chad
|
|
219
|
+
214. TF - French Southern & Antarctic Lands
|
|
220
|
+
215. TG - Togo
|
|
221
|
+
216. TH - Thailand
|
|
222
|
+
217. TJ - Tajikistan
|
|
223
|
+
218. TK - Tokelau
|
|
224
|
+
219. TL - East Timor
|
|
225
|
+
220. TM - Turkmenistan
|
|
226
|
+
221. TN - Tunisia
|
|
227
|
+
222. TO - Tonga
|
|
228
|
+
223. TR - Turkey
|
|
229
|
+
224. TT - Trinidad & Tobago
|
|
230
|
+
225. TV - Tuvalu
|
|
231
|
+
226. TW - Taiwan
|
|
232
|
+
227. TZ - Tanzania
|
|
233
|
+
228. UA - Ukraine
|
|
234
|
+
229. UG - Uganda
|
|
235
|
+
230. UM - US minor outlying islands
|
|
236
|
+
231. US - United States
|
|
237
|
+
232. UY - Uruguay
|
|
238
|
+
233. UZ - Uzbekistan
|
|
239
|
+
234. VA - Vatican City
|
|
240
|
+
235. VC - St Vincent
|
|
241
|
+
236. VE - Venezuela
|
|
242
|
+
237. VG - Virgin Islands (UK)
|
|
243
|
+
238. VI - Virgin Islands (US)
|
|
244
|
+
239. VN - Vietnam
|
|
245
|
+
240. VU - Vanuatu
|
|
246
|
+
241. WF - Wallis & Futuna
|
|
247
|
+
242. WS - Samoa (western)
|
|
248
|
+
243. YE - Yemen
|
|
249
|
+
244. YT - Mayotte
|
|
250
|
+
245. ZA - South Africa
|
|
251
|
+
246. ZM - Zambia
|
|
252
|
+
247. ZW - Zimbabwe
|
{clox-0.7 → clox-0.8}/PKG-INFO
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: clox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8
|
|
4
4
|
Summary: A Geeky Clock for Terminal Enthusiasts
|
|
5
5
|
Home-page: https://github.com/sepandhaghighi/clox
|
|
6
|
-
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.
|
|
6
|
+
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.8
|
|
7
7
|
Author: Sepand Haghighi
|
|
8
8
|
Author-email: me@sepand.tech
|
|
9
9
|
License: MIT
|
|
@@ -104,13 +104,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
104
104
|
## Installation
|
|
105
105
|
|
|
106
106
|
### Source Code
|
|
107
|
-
- Download [Version 0.
|
|
107
|
+
- Download [Version 0.8](https://github.com/sepandhaghighi/clox/archive/v0.8.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
108
108
|
- `pip install .`
|
|
109
109
|
|
|
110
110
|
### PyPI
|
|
111
111
|
|
|
112
112
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
113
|
-
- `pip install clox==0.
|
|
113
|
+
- `pip install clox==0.8`
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
## Usage
|
|
@@ -143,16 +143,30 @@ clox
|
|
|
143
143
|
clox --face=3
|
|
144
144
|
```
|
|
145
145
|
* Use `--face=-1` for random mode
|
|
146
|
-
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md)
|
|
147
|
-
|
|
146
|
+
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md): `clox --faces-list`
|
|
147
|
+
|
|
148
148
|
|
|
149
149
|
### Timezone
|
|
150
150
|
|
|
151
151
|
```console
|
|
152
152
|
clox --timezone="Etc/GMT+7"
|
|
153
153
|
```
|
|
154
|
-
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md)
|
|
155
|
-
|
|
154
|
+
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md): `clox --timezones-list`
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Country
|
|
158
|
+
|
|
159
|
+
The `--country` argument allows you to specify a country using its **ISO 3166** code format
|
|
160
|
+
|
|
161
|
+
ℹ️ When the `--country` argument is provided, the `--timezone` argument will be ignored
|
|
162
|
+
|
|
163
|
+
ℹ️ If the specified country has multiple timezones, the first timezone will be selected automatically
|
|
164
|
+
|
|
165
|
+
```console
|
|
166
|
+
clox --country="DE"
|
|
167
|
+
```
|
|
168
|
+
* [Countries List](https://github.com/sepandhaghighi/clox/blob/main/COUNTRIES.md): `clox --countries-list`
|
|
169
|
+
|
|
156
170
|
|
|
157
171
|
### Vertical/Horizontal Shift
|
|
158
172
|
|
|
@@ -278,6 +292,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
278
292
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
279
293
|
|
|
280
294
|
## [Unreleased]
|
|
295
|
+
## [0.8] - 2025-03-16
|
|
296
|
+
### Added
|
|
297
|
+
- `--country` argument
|
|
298
|
+
- `--countries-list` argument
|
|
299
|
+
- `COUNTRIES.md`
|
|
300
|
+
### Changed
|
|
301
|
+
- Input case sensitivity bug fixed
|
|
302
|
+
- Test system modified
|
|
303
|
+
- `README.md` updated
|
|
281
304
|
## [0.7] - 2025-03-06
|
|
282
305
|
### Added
|
|
283
306
|
- Jalali calendar
|
|
@@ -322,7 +345,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
322
345
|
- `TIMEZONES.md`
|
|
323
346
|
- `FACES.md`
|
|
324
347
|
|
|
325
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.
|
|
348
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.8...dev
|
|
349
|
+
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
|
326
350
|
[0.7]: https://github.com/sepandhaghighi/clox/compare/v0.6...v0.7
|
|
327
351
|
[0.6]: https://github.com/sepandhaghighi/clox/compare/v0.5...v0.6
|
|
328
352
|
[0.5]: https://github.com/sepandhaghighi/clox/compare/v0.4...v0.5
|
{clox-0.7 → clox-0.8}/README.md
RENAMED
|
@@ -53,13 +53,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
53
53
|
## Installation
|
|
54
54
|
|
|
55
55
|
### Source Code
|
|
56
|
-
- Download [Version 0.
|
|
56
|
+
- Download [Version 0.8](https://github.com/sepandhaghighi/clox/archive/v0.8.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
57
57
|
- `pip install .`
|
|
58
58
|
|
|
59
59
|
### PyPI
|
|
60
60
|
|
|
61
61
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
62
|
-
- `pip install clox==0.
|
|
62
|
+
- `pip install clox==0.8`
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
## Usage
|
|
@@ -92,16 +92,30 @@ clox
|
|
|
92
92
|
clox --face=3
|
|
93
93
|
```
|
|
94
94
|
* Use `--face=-1` for random mode
|
|
95
|
-
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md)
|
|
96
|
-
|
|
95
|
+
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md): `clox --faces-list`
|
|
96
|
+
|
|
97
97
|
|
|
98
98
|
### Timezone
|
|
99
99
|
|
|
100
100
|
```console
|
|
101
101
|
clox --timezone="Etc/GMT+7"
|
|
102
102
|
```
|
|
103
|
-
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md)
|
|
104
|
-
|
|
103
|
+
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md): `clox --timezones-list`
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Country
|
|
107
|
+
|
|
108
|
+
The `--country` argument allows you to specify a country using its **ISO 3166** code format
|
|
109
|
+
|
|
110
|
+
ℹ️ When the `--country` argument is provided, the `--timezone` argument will be ignored
|
|
111
|
+
|
|
112
|
+
ℹ️ If the specified country has multiple timezones, the first timezone will be selected automatically
|
|
113
|
+
|
|
114
|
+
```console
|
|
115
|
+
clox --country="DE"
|
|
116
|
+
```
|
|
117
|
+
* [Countries List](https://github.com/sepandhaghighi/clox/blob/main/COUNTRIES.md): `clox --countries-list`
|
|
118
|
+
|
|
105
119
|
|
|
106
120
|
### Vertical/Horizontal Shift
|
|
107
121
|
|
|
@@ -13,9 +13,10 @@ from art import tprint
|
|
|
13
13
|
from .jcalendar import TextCalendar as JalaliCalendar
|
|
14
14
|
from .params import HORIZONTAL_TIME_24H_FORMATS, VERTICAL_TIME_24H_FORMATS
|
|
15
15
|
from .params import HORIZONTAL_TIME_12H_FORMATS, VERTICAL_TIME_12H_FORMATS
|
|
16
|
-
from .params import
|
|
16
|
+
from .params import CLOX_VERSION, DATE_FORMAT
|
|
17
|
+
from .params import TIMEZONES_LIST, COUNTRIES_LIST
|
|
17
18
|
from .params import ADDITIONAL_INFO, EXIT_MESSAGE
|
|
18
|
-
from .params import FACES_MAP, FACES_LIST,
|
|
19
|
+
from .params import FACES_MAP, FACES_LIST, CALENDARS_LIST, DATE_SYSTEMS_LIST
|
|
19
20
|
from .params import HORIZONTAL_FACES_LIST_EXAMPLE, VERTICAL_FACES_LIST_EXAMPLE
|
|
20
21
|
from .params import CLOX_OVERVIEW, CLOX_REPO
|
|
21
22
|
|
|
@@ -77,18 +78,45 @@ def show_faces_list(vertical=False):
|
|
|
77
78
|
print('=' * 80)
|
|
78
79
|
|
|
79
80
|
|
|
80
|
-
def show_timezones_list():
|
|
81
|
+
def show_timezones_list(country=None):
|
|
81
82
|
"""
|
|
82
83
|
Show timezones list.
|
|
83
84
|
|
|
85
|
+
:param country: country iso3166 code
|
|
86
|
+
:type country: str
|
|
84
87
|
:return: None
|
|
85
88
|
"""
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
timezones_list = TIMEZONES_LIST
|
|
90
|
+
country_name = "All"
|
|
91
|
+
if country is not None:
|
|
92
|
+
timezones_list = list(map(lambda x: x.upper(), pytz.country_timezones(country)))
|
|
93
|
+
country_name = pytz.country_names[country]
|
|
94
|
+
try:
|
|
95
|
+
print("Timezones list ({country_name}):\n".format(country_name=country_name))
|
|
96
|
+
except Exception:
|
|
97
|
+
print("Timezones list ({country_name}):\n".format(country_name=country.upper()))
|
|
98
|
+
for index, timezone in enumerate(sorted(timezones_list), 1):
|
|
88
99
|
print("{index}. {timezone}".format(index=index, timezone=timezone))
|
|
89
100
|
|
|
90
101
|
|
|
91
|
-
def
|
|
102
|
+
def show_countries_list():
|
|
103
|
+
"""
|
|
104
|
+
Show countries list.
|
|
105
|
+
|
|
106
|
+
:return: None
|
|
107
|
+
"""
|
|
108
|
+
print("Countries list:\n")
|
|
109
|
+
for index, country_code in enumerate(sorted(COUNTRIES_LIST), 1):
|
|
110
|
+
country_name = pytz.country_names[country_code]
|
|
111
|
+
try:
|
|
112
|
+
print("{index}. {country_code} - {country_name}".format(index=index,
|
|
113
|
+
country_code=country_code, country_name=country_name))
|
|
114
|
+
except Exception:
|
|
115
|
+
print("{index}. {country_code} - {country_name}".format(index=index,
|
|
116
|
+
country_code=country_code, country_name=country_code))
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
def print_calendar(mode="month", timezone=None, country=None, v_shift=0, h_shift=0, date_system="gregorian"):
|
|
92
120
|
"""
|
|
93
121
|
Print calendar.
|
|
94
122
|
|
|
@@ -96,6 +124,8 @@ def print_calendar(mode="month", timezone=None, v_shift=0, h_shift=0, date_syste
|
|
|
96
124
|
:type mode: str
|
|
97
125
|
:param timezone: timezone
|
|
98
126
|
:type timezone: str
|
|
127
|
+
:param country: country iso3166 code
|
|
128
|
+
:type country: str
|
|
99
129
|
:param v_shift: vertical shift
|
|
100
130
|
:type v_shift: int
|
|
101
131
|
:param h_shift: horizontal shift
|
|
@@ -111,6 +141,8 @@ def print_calendar(mode="month", timezone=None, v_shift=0, h_shift=0, date_syste
|
|
|
111
141
|
calendar_obj = JalaliCalendar()
|
|
112
142
|
tz = None
|
|
113
143
|
timezone_str = "Local"
|
|
144
|
+
if country is not None:
|
|
145
|
+
timezone = pytz.country_timezones(country)[0].upper()
|
|
114
146
|
if timezone is not None:
|
|
115
147
|
timezone_str = timezone
|
|
116
148
|
tz = pytz.timezone(timezone)
|
|
@@ -131,6 +163,7 @@ def print_calendar(mode="month", timezone=None, v_shift=0, h_shift=0, date_syste
|
|
|
131
163
|
|
|
132
164
|
def run_clock(
|
|
133
165
|
timezone=None,
|
|
166
|
+
country=None,
|
|
134
167
|
v_shift=0,
|
|
135
168
|
h_shift=0,
|
|
136
169
|
face=1,
|
|
@@ -145,6 +178,8 @@ def run_clock(
|
|
|
145
178
|
|
|
146
179
|
:param timezone: timezone
|
|
147
180
|
:type timezone: str
|
|
181
|
+
:param country: country iso3166 code
|
|
182
|
+
:type country: str
|
|
148
183
|
:param v_shift: vertical shift
|
|
149
184
|
:type v_shift: int
|
|
150
185
|
:param h_shift: horizontal shift
|
|
@@ -174,6 +209,8 @@ def run_clock(
|
|
|
174
209
|
time_formats = VERTICAL_TIME_12H_FORMATS if am_pm else VERTICAL_TIME_24H_FORMATS
|
|
175
210
|
tz = None
|
|
176
211
|
timezone_str = "Local"
|
|
212
|
+
if country is not None:
|
|
213
|
+
timezone = pytz.country_timezones(country)[0].upper()
|
|
177
214
|
if timezone is not None:
|
|
178
215
|
timezone_str = timezone
|
|
179
216
|
tz = pytz.timezone(timezone)
|
|
@@ -207,7 +244,8 @@ def main():
|
|
|
207
244
|
"""
|
|
208
245
|
parser = argparse.ArgumentParser()
|
|
209
246
|
parser.epilog = ADDITIONAL_INFO
|
|
210
|
-
parser.add_argument('--timezone', help='timezone', type=str, choices=TIMEZONES_LIST)
|
|
247
|
+
parser.add_argument('--timezone', help='timezone', type=str.upper, choices=TIMEZONES_LIST)
|
|
248
|
+
parser.add_argument('--country', help='country (iso3166 code)', type=str.upper, choices=COUNTRIES_LIST)
|
|
211
249
|
parser.add_argument('--v-shift', help='vertical shift', type=int, default=0)
|
|
212
250
|
parser.add_argument('--h-shift', help='horizontal shift', type=int, default=0)
|
|
213
251
|
parser.add_argument('--version', help='version', nargs="?", const=1)
|
|
@@ -215,13 +253,19 @@ def main():
|
|
|
215
253
|
parser.add_argument('--face', help='face', type=int, choices=FACES_LIST, default=1)
|
|
216
254
|
parser.add_argument('--faces-list', help='faces list', nargs="?", const=1)
|
|
217
255
|
parser.add_argument('--timezones-list', help='timezones list', nargs="?", const=1)
|
|
256
|
+
parser.add_argument('--countries-list', help='countries list', nargs="?", const=1)
|
|
218
257
|
parser.add_argument('--no-blink', help='disable blinking mode', nargs="?", const=1)
|
|
219
258
|
parser.add_argument('--vertical', help='vertical mode', nargs="?", const=1)
|
|
220
259
|
parser.add_argument('--hide-date', help='hide date', nargs="?", const=1)
|
|
221
260
|
parser.add_argument('--hide-timezone', help='hide timezone', nargs="?", const=1)
|
|
222
261
|
parser.add_argument('--am-pm', help='AM/PM mode', nargs="?", const=1)
|
|
223
|
-
parser.add_argument('--calendar', help='calendar mode', type=str, choices=
|
|
224
|
-
parser.add_argument(
|
|
262
|
+
parser.add_argument('--calendar', help='calendar mode', type=str.lower, choices=CALENDARS_LIST)
|
|
263
|
+
parser.add_argument(
|
|
264
|
+
'--date-system',
|
|
265
|
+
help='date system',
|
|
266
|
+
type=str.lower,
|
|
267
|
+
choices=DATE_SYSTEMS_LIST,
|
|
268
|
+
default="gregorian")
|
|
225
269
|
args = parser.parse_args()
|
|
226
270
|
if args.version:
|
|
227
271
|
print(CLOX_VERSION)
|
|
@@ -230,11 +274,14 @@ def main():
|
|
|
230
274
|
elif args.faces_list:
|
|
231
275
|
show_faces_list(vertical=args.vertical)
|
|
232
276
|
elif args.timezones_list:
|
|
233
|
-
show_timezones_list()
|
|
277
|
+
show_timezones_list(args.country)
|
|
278
|
+
elif args.countries_list:
|
|
279
|
+
show_countries_list()
|
|
234
280
|
elif args.calendar:
|
|
235
281
|
print_calendar(
|
|
236
282
|
mode=args.calendar,
|
|
237
283
|
timezone=args.timezone,
|
|
284
|
+
country=args.country,
|
|
238
285
|
h_shift=args.h_shift,
|
|
239
286
|
v_shift=args.v_shift,
|
|
240
287
|
date_system=args.date_system)
|
|
@@ -242,6 +289,7 @@ def main():
|
|
|
242
289
|
try:
|
|
243
290
|
run_clock(
|
|
244
291
|
timezone=args.timezone,
|
|
292
|
+
country=args.country,
|
|
245
293
|
h_shift=args.h_shift,
|
|
246
294
|
v_shift=args.v_shift,
|
|
247
295
|
face=args.face,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""clox params."""
|
|
3
3
|
import pytz
|
|
4
4
|
|
|
5
|
-
CLOX_VERSION = "0.
|
|
5
|
+
CLOX_VERSION = "0.8"
|
|
6
6
|
|
|
7
7
|
CLOX_OVERVIEW = '''
|
|
8
8
|
Clox is a terminal-based clock application designed for terminal enthusiasts who appreciate simplicity,
|
|
@@ -24,7 +24,8 @@ HORIZONTAL_TIME_12H_FORMATS = ['%I:%M %p', '%I:%M %p.']
|
|
|
24
24
|
VERTICAL_TIME_12H_FORMATS = ['%I\n%M\n%p', '%I\n%M\n%p.']
|
|
25
25
|
DATE_FORMAT = "%A, %B %d, %Y"
|
|
26
26
|
|
|
27
|
-
TIMEZONES_LIST = pytz.all_timezones
|
|
27
|
+
TIMEZONES_LIST = list(map(lambda x: x.upper(), pytz.all_timezones))
|
|
28
|
+
COUNTRIES_LIST = list(map(lambda x: x.upper(), pytz.country_timezones.keys()))
|
|
28
29
|
|
|
29
30
|
|
|
30
31
|
FACES_MAP = {
|
|
@@ -57,6 +58,6 @@ FACES_MAP = {
|
|
|
57
58
|
|
|
58
59
|
FACES_LIST = [-1] + sorted(FACES_MAP)
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
CALENDARS_LIST = ["month", "year"]
|
|
61
62
|
|
|
62
63
|
DATE_SYSTEMS_LIST = ["gregorian", "jalali"]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: clox
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.8
|
|
4
4
|
Summary: A Geeky Clock for Terminal Enthusiasts
|
|
5
5
|
Home-page: https://github.com/sepandhaghighi/clox
|
|
6
|
-
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.
|
|
6
|
+
Download-URL: https://github.com/sepandhaghighi/clox/tarball/v0.8
|
|
7
7
|
Author: Sepand Haghighi
|
|
8
8
|
Author-email: me@sepand.tech
|
|
9
9
|
License: MIT
|
|
@@ -104,13 +104,13 @@ Clox is a terminal-based clock application designed for terminal enthusiasts who
|
|
|
104
104
|
## Installation
|
|
105
105
|
|
|
106
106
|
### Source Code
|
|
107
|
-
- Download [Version 0.
|
|
107
|
+
- Download [Version 0.8](https://github.com/sepandhaghighi/clox/archive/v0.8.zip) or [Latest Source](https://github.com/sepandhaghighi/clox/archive/dev.zip)
|
|
108
108
|
- `pip install .`
|
|
109
109
|
|
|
110
110
|
### PyPI
|
|
111
111
|
|
|
112
112
|
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
|
|
113
|
-
- `pip install clox==0.
|
|
113
|
+
- `pip install clox==0.8`
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
## Usage
|
|
@@ -143,16 +143,30 @@ clox
|
|
|
143
143
|
clox --face=3
|
|
144
144
|
```
|
|
145
145
|
* Use `--face=-1` for random mode
|
|
146
|
-
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md)
|
|
147
|
-
|
|
146
|
+
* [Faces List](https://github.com/sepandhaghighi/clox/blob/main/FACES.md): `clox --faces-list`
|
|
147
|
+
|
|
148
148
|
|
|
149
149
|
### Timezone
|
|
150
150
|
|
|
151
151
|
```console
|
|
152
152
|
clox --timezone="Etc/GMT+7"
|
|
153
153
|
```
|
|
154
|
-
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md)
|
|
155
|
-
|
|
154
|
+
* [Timezones List](https://github.com/sepandhaghighi/clox/blob/main/TIMEZONES.md): `clox --timezones-list`
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
### Country
|
|
158
|
+
|
|
159
|
+
The `--country` argument allows you to specify a country using its **ISO 3166** code format
|
|
160
|
+
|
|
161
|
+
ℹ️ When the `--country` argument is provided, the `--timezone` argument will be ignored
|
|
162
|
+
|
|
163
|
+
ℹ️ If the specified country has multiple timezones, the first timezone will be selected automatically
|
|
164
|
+
|
|
165
|
+
```console
|
|
166
|
+
clox --country="DE"
|
|
167
|
+
```
|
|
168
|
+
* [Countries List](https://github.com/sepandhaghighi/clox/blob/main/COUNTRIES.md): `clox --countries-list`
|
|
169
|
+
|
|
156
170
|
|
|
157
171
|
### Vertical/Horizontal Shift
|
|
158
172
|
|
|
@@ -278,6 +292,15 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
|
278
292
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
279
293
|
|
|
280
294
|
## [Unreleased]
|
|
295
|
+
## [0.8] - 2025-03-16
|
|
296
|
+
### Added
|
|
297
|
+
- `--country` argument
|
|
298
|
+
- `--countries-list` argument
|
|
299
|
+
- `COUNTRIES.md`
|
|
300
|
+
### Changed
|
|
301
|
+
- Input case sensitivity bug fixed
|
|
302
|
+
- Test system modified
|
|
303
|
+
- `README.md` updated
|
|
281
304
|
## [0.7] - 2025-03-06
|
|
282
305
|
### Added
|
|
283
306
|
- Jalali calendar
|
|
@@ -322,7 +345,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
|
322
345
|
- `TIMEZONES.md`
|
|
323
346
|
- `FACES.md`
|
|
324
347
|
|
|
325
|
-
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.
|
|
348
|
+
[Unreleased]: https://github.com/sepandhaghighi/clox/compare/v0.8...dev
|
|
349
|
+
[0.8]: https://github.com/sepandhaghighi/clox/compare/v0.7...v0.8
|
|
326
350
|
[0.7]: https://github.com/sepandhaghighi/clox/compare/v0.6...v0.7
|
|
327
351
|
[0.6]: https://github.com/sepandhaghighi/clox/compare/v0.5...v0.6
|
|
328
352
|
[0.5]: https://github.com/sepandhaghighi/clox/compare/v0.4...v0.5
|
{clox-0.7 → clox-0.8}/setup.py
RENAMED
|
@@ -29,7 +29,7 @@ def read_description():
|
|
|
29
29
|
setup(
|
|
30
30
|
name='clox',
|
|
31
31
|
packages=['clox'],
|
|
32
|
-
version='0.
|
|
32
|
+
version='0.8',
|
|
33
33
|
description='A Geeky Clock for Terminal Enthusiasts',
|
|
34
34
|
long_description=read_description(),
|
|
35
35
|
long_description_content_type='text/markdown',
|
|
@@ -37,7 +37,7 @@ setup(
|
|
|
37
37
|
author='Sepand Haghighi',
|
|
38
38
|
author_email='me@sepand.tech',
|
|
39
39
|
url='https://github.com/sepandhaghighi/clox',
|
|
40
|
-
download_url='https://github.com/sepandhaghighi/clox/tarball/v0.
|
|
40
|
+
download_url='https://github.com/sepandhaghighi/clox/tarball/v0.8',
|
|
41
41
|
keywords="clock time timer timezone terminal cli geek clox",
|
|
42
42
|
project_urls={
|
|
43
43
|
'Source': 'https://github.com/sepandhaghighi/clox'
|
{clox-0.7 → clox-0.8}/AUTHORS.md
RENAMED
|
File without changes
|
{clox-0.7 → clox-0.8}/FACES.md
RENAMED
|
File without changes
|
{clox-0.7 → clox-0.8}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{clox-0.7 → clox-0.8}/setup.cfg
RENAMED
|
File without changes
|