#!/usr/bin/env python3

import click
from importlib.metadata import version as pkg_version

def print_version(ctx, param, value):
    if not value or ctx.resilient_parsing:
        return
    print(pkg_version('jusfltuls'))
    ctx.exit()

@click.command(context_settings=dict(help_option_names=['-h', '--help']))
@click.option('-v', '--version', is_flag=True, callback=print_version, expose_value=False, is_eager=True, help='Show version and exit')
def main():
    """Jusfltuls - Useful tools for linux life"""
    print("""
    dtox        - detox filenames with bad characters, but more useful
    cpuspeed    -
    pingy       -
    sshconf     -
    zoter       -
    wavescan    -
    smartnow    -
    jusfltuls   -
    distcheck   - helper for uv pushlishing in PyPI
    pycompress  -
    mci         - influx mc client
    ssshow      - services show
    fawhis      - fast_whisper
    mpvsa       - mpv, but for a video, find the best audio and subtitle in the folder; create waterfall
    """)
    return "Hello from usfltuls! Myself, I reside in __init__; TRY sshconf dtox cpuspeed pingy smartnow distcheck"

if __name__ == "__main__":
    main()
