doitlive is a tool for live presentations in the terminal. It reads a file of shell commands and replays the commands in a fake terminal session as you type random characters.
This project is a fork of sloria/doitlive aiming at introducing experimental support for markdown-based rendering of comments. If you are not after the markdown support introduced by this fork you should use the upstream project instead.
$ pip install git+https://github.com/avicent/doitlive.git
Requires Python >= 2.7 or >= 3.3 with pip.
Differences with respect to sloria/doitlive
The following magic-comments/directives are supported:
#doitlive commentformat: [markdown|plain]
- Tells doitlive to interpret the comments as markdown-encoded and, provided
commentecho
is on, to render them usingmdv
(see Dependecies below). Note that the leading the hash character and the first space are stripped from the original line before rendering them as markdown.
- Tells doitlive to interpret the comments as markdown-encoded and, provided
#doitlive markdowntheme: <theme>
- Tells doitlive to force
mdv
into using the specified theme for both text and code. Runmdv -it all
to see theme samples.
- Tells doitlive to force
#doitlive click: <method>
- Instructs doitlive to call
click.<method>()
. This can be useful to pause after echoing some of the comments.
- Instructs doitlive to call
#doitlive cd: <path>
- Tells doitlive to quietly change the directory.
In addition, a line starting with at least eight #
signs will be treated as section divider and will result in a prompt to press any key to continue at the bottom of the screen prior to having the screen cleaned.
#doitlive shell: /bin/bash
#doitlive prompt: default
#doitlive commentecho: true
#doitlive speed: 1000
#doitlive commentformat: markdown
#doitlive markdowntheme: 884.0134
# # DEMONSTRATING DOITLIVE (1/2)
#
# This comment is interpreted as markdown. We can use:
#
# - Bullet lists.
# - Syntax _highlighting_.
# - Horizontal separators, as the one below.
#
# ---
whatis windows
################################################
# # DEMONSTRATING DOITLIVE (2/2)
#
# We can also use `#doitlive click: getchar` to insert pauses.
#doitlive click: getchar
# Now we continue after the pause.
#
# ---
echo "That's all folks!"
This fork introduces the following dependencies on top of the upstream ones:
mdv
- Used for rendering the markdown comments to the terminal . Note that the dependency to
mdv
insetup.py
is pointing to avicent/mdv and not the originalmdv
from axiros/mdv in order to improve some rendering aesthetics. The officialmdv
should also work, though.
- Used for rendering the markdown comments to the terminal . Note that the dependency to
blessed
- Used for positioning the cursor.
MIT licensed. See the bundled LICENSE file for more details.