feat: remove deprecated shell scripts and add Python alternatives for all of them
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
Some checks failed
Nix Format Check / check-format (push) Failing after 37s
This commit is contained in:
28
bin/actions/help.py
Executable file
28
bin/actions/help.py
Executable file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Import helper functions
|
||||
sys.path.append(os.path.join(os.path.expanduser("~/.dotfiles"), "bin"))
|
||||
from helpers.functions import printfe, println, logo
|
||||
|
||||
def main():
|
||||
# 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") as f:
|
||||
help_text = f.read()
|
||||
print(help_text)
|
||||
except Exception as e:
|
||||
printfe("red", f"Error reading help file: {e}")
|
||||
return 1
|
||||
|
||||
println(" ", "cyan")
|
||||
return 0
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
Reference in New Issue
Block a user