Skip to main content

Army Days (Python version)

Overview

A command-line program to display the number of days until certain events. This program (hence its name) is also based on the West Point requirement that first year cadets have to be able to recite "the days". Part of that tradition is that if it is past noon at the time, you subtract a day but add "and a butt". As most people aren't concerned about being West Point style, this is an optional feature that can be enabled via a flag. Past events can optionally be displayed via configuration.

Installing as a CLI Tool

For regular usage, it's useful to install the program using either pipx or uv tool or just run directly with uvx.

Usage

Example output

❯ army-days
 Days
89 days until Army beats the hell out of Navy.
100 days until Christmas.

Help

Once installed, you can run the command with the --help option.

❯ army-days --help
Usage: army-days [-f FILENAME] [-g] [-p SHOW_PAST] [-a] [-h] [-v]

  day countdown program (python edition)

  Options
    [-f, --filename FILENAME]    configuration file; by default searches:
                                 ./days.yaml ./days.json ~/days.yaml
                                 ~/days.json ~/.days.yaml ~/.days.json.
    [-g, --generate-sample]      generate sample data in yaml format (sends to
                                 stdout).
    [-p, --show-past SHOW_PAST]  show past events within the past N days (use 0
                                 to show all past events).
    [-a, --show-all]             show all future events, bypassing
                                 max_days_future config limit.

  Help
    [-h, --help]                 Show this message and exit.
    [-v, --version]              Show the version and exit.

Configuration / Input file

By default (as the help indicates), army-days looks for a configuration file in this order:

  • days.yaml or days.json in the current working directory.
  • days.yaml or days.json in the user's home directory.
  • .days.yaml or .days.json in the user's home directory.

You can override the name of the configuration file via the -f / --filename option.

Sample Configuration File Generation

To generate a sample configuration file:

army-days -g > days.yaml

The sample file will look similar to this:

config:
  show_completed: false
  use_army_butt_days: false
entries:
- date: '2025-09-15T00:00:00'
  title: your one year anniversary of using army-days
- alwaysShow: true
  date: '2024-09-15T00:00:00'
  showPastLimit: 400
  title: example always-shown event (e.g., 'broke my leg')

Showing Past Events

Army-days provides multiple ways to display past events:

Command-line option

Use the -p / --show-past option to show past events. It always takes an integer day-limit; pass 0 to show all past events:

# Show all past events
army-days --show-past 0

# Show only past events within the last 365 days
army-days --show-past 365

Per-event configuration

You can configure individual events to always show, even if they're in the past, by using the alwaysShow and showPastLimit options:

entries:
- date: '2024-06-01'
  title: broke my leg
  alwaysShow: true
  showPastLimit: 400  # Only show if within the past 400 days
  • alwaysShow: When set to true, this event will always be displayed, regardless of the global show_completed setting
  • showPastLimit: Optional limit (in days) for how far in the past to show this event. If omitted, the event will always show regardless of how long ago it occurred

Global configuration

You can also set show_completed: true in the config section to always show all past events:

config:
  show_completed: true

Development

This project uses uv for dependency management and virtual environment management.

uv python install
uv sync

Running tests

For basic tests with coverage:

uv run pytest --cov

And for tests with coverage and more verbose output also allowing stdout:

uv run pytest --cov -v -s

Running the program

uv run army-days

Metadata

Release files for army-days 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for army-days 0.6.0
File Size Uploaded Provenance Actions
army_days-0.6.0.tar.gz 55.9 kB Without provenance Details for army_days-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for army-days 0.6.0
File Interpreter ABI Platform Actions
army_days-0.6.0-py3-none-any.whl Python 3 none any Details for army_days-0.6.0-py3-none-any.whl

Total release size: 66.6 kB

Release files / army_days-0.6.0.tar.gz

Download URL army_days-0.6.0.tar.gz
Size 55.9 kB
Tags Source
SHA-256 checksum
How to use checksums
683679caf2640c6e32218e1463fa86fdd1701a7b130ad3e58f5503009333af91
BLAKE2b-256 checksum
How to use checksums
3107035acb85062008dd89f51512f6c626be80f39ced556f1cd6bc6e0ae5cb18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.4

Release files / army_days-0.6.0-py3-none-any.whl

Download URL army_days-0.6.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6820aa3da79a4c885e5d03a3c0c2eb184f935bad2b1766999ae3f6a1a52f6daa
BLAKE2b-256 checksum
How to use checksums
1832feca68d8fe9cfc638b838c02fe82b1f49b8d95d275ed4e81a8558bdad709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.4

Security for army-days 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page