Metadata-Version: 2.4
Name: term-clock-app
Version: 1.0.0
Summary: A terminal digital clock that scales to fill the window.
Author: Lorenzo Wood
License: MIT License
        
        Copyright (c) 2026 Lorenzo Wood
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT ANY WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/lorenzowood/term-clock
Project-URL: Repository, https://github.com/lorenzowood/term-clock
Project-URL: Issues, https://github.com/lorenzowood/term-clock/issues
Keywords: clock,terminal,tui,ssh
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Dynamic: license-file

# term-clock

A digital clock for the terminal. It shows `hh:mm:ss`, stays on the wall-clock
second, and grows to fill the window.

Works over SSH the same way it works locally: alternate screen, no flicker,
CTRL+C returns you to the prompt.

## Install

```sh
pip install term-clock-app
```

The PyPI name is `term-clock-app` because `term-clock` / `termclock` is already taken. The command you run is still `term-clock`.

From a clone:

```sh
pip install -e .
```

Python 3.9 or newer. No runtime dependencies.

## Run

```sh
term-clock
# or
python -m term_clock
```

```sh
term-clock --padding 1 --spacing 2          # defaults
term-clock --padding 2 --spacing 4
term-clock --hour-format 12
term-clock --hour-format 24
```

Press **CTRL+C** to quit.

## Options

| Flag | Default | Meaning |
| --- | --- | --- |
| `--padding N` | `1` | Blank rows and columns on every side |
| `--spacing N` | `2` | Blank columns between digits |
| `--hour-format {12,24}` | system clock, or `24` | 12-hour with AM/PM, or 24-hour |

The default hour format follows the environment's time locale
(`LC_TIME` / `T_FMT`) when that can be read. If it cannot, the clock uses 24-hour.

## Display

- **7 or fewer lines**: a plain text clock, centred.
- **8+ lines**: large seven-segment digits drawn with full blocks `█` for
  horizontal and vertical bars, and the four triangles `◤ ◥ ◣ ◢` for 45°
  corner cuts (one column per row — never sampled, never an off-angle
  diagonal). They grow to fill the window (each axis stretched by at most
  1.5× before the rest becomes centring margin). If the window is too small
  for a readable clock, it falls back to the text version.
- **Colons**: two small axis-aligned blocks (no diagonals), centred, spanning
  at most one third of the digit height.
- **12-hour**: AM or PM sits to the right of the digits.
- **Timing**: after each flip the process sleeps until the next wall-clock
  second, then measures how late or early it woke (target: within 2 ms) and
  shortens or lengthens the following sleep. A resize is picked up on the
  next second. Unchanged cells are not rewritten.

## Develop

```sh
pip install -e ".[dev]"
pytest
```

Pure rendering lives in `term_clock/core.py` (unit-tested). The terminal loop
is in `term_clock/cli.py`.

See `DESIGN.md` for the design and the TDD log.

## License

MIT. See `LICENSE`.
