Files
dotfiles/bin/actions/help.py
Menno van Leeuwen e1b07a6edf
All checks were successful
Ansible Lint Check / check-ansible (push) Successful in 1m17s
Nix Format Check / check-format (push) Successful in 44s
Python Lint Check / check-python (push) Successful in 9s
Add WSL support and fix config formatting
2025-10-22 16:18:08 +02:00

36 lines
809 B
Python
Executable File

#!/usr/bin/env python3
"""Display help information for the dotfiles system."""
import os
import sys
# Import helper functions
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
from helpers.functions import printfe, println, logo
def main():
"""Display help information."""
# Print logo
logo(continue_after=True)
# Print help
dotfiles_path = os.environ.get("DOTFILES_PATH", os.path.expanduser("~/.dotfiles"))
try:
with open(
f"{dotfiles_path}/bin/resources/help.txt", "r", encoding="utf-8"
) as f:
help_text = f.read()
except OSError as e:
printfe("red", f"Error reading help file: {e}")
return 1
print(help_text)
println(" ", "cyan")
return 0
if __name__ == "__main__":
sys.exit(main())