mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2025-01-26 09:48:55 +00:00
52 lines
2.4 KiB
Python
Executable file
52 lines
2.4 KiB
Python
Executable file
#!/usr/bin/env python
|
|
from butterfly.escapes import image
|
|
from butterfly.utils import ansi_colors
|
|
import os
|
|
import base64
|
|
|
|
print(ansi_colors.white + "Welcome to the butterfly help." + ansi_colors.reset)
|
|
with image('image/png'):
|
|
with open(
|
|
os.path.join(
|
|
os.path.abspath(os.path.dirname(__file__)),
|
|
'../static/images/favicon.png'), 'rb') as i:
|
|
print(base64.b64encode(i.read()).decode('ascii'))
|
|
print("""
|
|
Butterfly is a xterm compliant terminal built with python and javascript.
|
|
|
|
{title}Terminal functionalities:{reset}
|
|
{strong}[Alt] + [a] : {reset}Set an alarm which sends a notification when a modification is detected.
|
|
{strong}[Ctrl] + [Shift] + [Up] : {reset}Trigger visual selection mode. Hitting [Enter] inserts the selection in the prompt.
|
|
{strong}[ScrollLock] : {reset}Lock the scrolling to the current position. Press again to release.
|
|
{strong}[Alt] + [z] : {reset}Escape: don't catch the next pressed key. Useful for using native search for example. ([Alt] + [z] then [Ctrl] + [f]).
|
|
{strong}[Ctrl] + [c] <<hold>> : {reset}Cut the output when [Ctrl] + [c] is not enough.
|
|
|
|
|
|
{title}Butterfly programs:{reset}
|
|
{strong}bcat : {reset}A wrapper around cat allowing to display images as <img> instead of binary.
|
|
{strong}bopen : {reset}Open a new terminal at specified location.
|
|
{strong}b16M : {reset}Test the 16M colors support in terminal.
|
|
{strong}bhr : {reset}Put a html hr. This is a test and needs --allow-html-escapes flag.
|
|
{strong}bcal : {reset}Display current month using html. This is a test and needs --allow-html-escapes flag.
|
|
|
|
|
|
{title}Styling butterfly:{reset}
|
|
To style butterfly in sass, you need to have the libsass python library installed.
|
|
|
|
You will have to:
|
|
$ cp {main} ~/.butterfly/style.sass
|
|
or for system wide:
|
|
# cp {main} /etc/butterfly/style.sass
|
|
and then edit this file.
|
|
|
|
You can also copy the imported sass files in the same dir.
|
|
Sass files are compiled on the fly so just reload your tab to see the changes.
|
|
|
|
It is also possible to use a style.css file and re do all the styling in css exclusively.\
|
|
""".format(
|
|
title=ansi_colors.light_blue,
|
|
strong=ansi_colors.white,
|
|
reset=ansi_colors.reset,
|
|
main=os.path.normpath(os.path.join(
|
|
os.path.abspath(os.path.dirname(__file__)),
|
|
'../sass/main.sass'))))
|