A tool to show terminal tutorials.
Project description
Tutorterminal
A tool to create scripts to help and learn command line tools.
# Hashs are used to describe text that will be shown to the user.
#
# !checkfile command checks that a file not exists and allow you to continue the script
!checkfile .git
#
# <bold><green>You can use ANSIMARKUP to format your text</green></bold>
#
## Double hashs mark text that are related and used as a help for the next command/input.
#
# run command prompts the user for a command that match the regex indicated...
run git init$
#
# And then you can check if a file exists:
checkfile .git
#
# You can ask the user to press ENTER to continue
enter
#
# And also automatically create a file (example.txt):
### exemple.txt
Arquivo de exemplo com 3 linhas:
Linha 0
Linha 1
Linha 2
###
#
# You can automatically run a command for the user with run_auto
#
run_auto ls
#
# And allow the user to run any command with run_free
run_free
Commands
#
# Anything to be displayed
Displays a text to the user. You can use ansimarkups to format text.
##
## Anything to be displayed
TODO A text displayed to the user that can be invoked by the help command.
###
### filename
file content
may have any number of lines
###
Command to create a file that will include any text from that command until the next ###.
checkfile and !checkfile
checkfile file_or_directory_to_be_checked if it exists
!checkfile file_or_directory_to_be_checked if it not exists
Checks if a file or directory exists (or not). If condition is not satisfied, the script will stop.
run
run regex_of_command
Create a user prompt where user must type a command that satisfies the regex passed as argument.
run_auto
run_auto command
Runs an command automatically as an user would (the prompt and command are displayed to the user).
run_free
run_free
Allow user to run any command.
Running tutorterminal
To run tutorterminal execute:
python3 learn_script.py [files]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tutorterminal-0.2.tar.gz.
File metadata
- Download URL: tutorterminal-0.2.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98e2bb94b79e1e798a9c5a7a2c1069ed9796556f008cce4b7845e73320916c7c
|
|
| MD5 |
3297ebb694af15b6539a5e164ca166ae
|
|
| BLAKE2b-256 |
938030ec31718f560e6fa5a9ffeefbefd5d80b1a5f68b65ab601d08c3878f7f4
|