Commit 53bc7272 authored by Tristan Van Berkom's avatar Tristan Van Berkom

doc: Don't allow setting a height on the generated session html

This was a bad idea and doesnt play well with mobile UIs, better
off to just include the whole thing even if it's long, and let
the backing page handle vertical scrolling.
parent d9da078d
Pipeline #23743271 passed with stages
in 67 minutes and 52 seconds
......@@ -379,9 +379,6 @@ The ``.run`` file format is just another YAML dictionary with a few options:
* ``directory``: The project directory to run commands on, relative to the ``.run`` file.
* ``height``: An optional string denoting that the height of the generated HTML should
be limited, possibly resulting in vertical scrolling.
* ``prepare-commands``: A list of command strings which should be run first
* ``command``: The command to capture the output of
......
......@@ -212,10 +212,6 @@ def run_bst(directory, source_cache, description, palette, output, command):
# A relative path to the project, from the description file itself
directory: path/to/project
\b
# An optional string indicating the height limit (making it scrollable)
height: '300px'
\b
# A list of commands to run in preparation
prepare-commands:
......@@ -226,7 +222,6 @@ def run_bst(directory, source_cache, description, palette, output, command):
command: build hello.bst
"""
prepare_commands = []
height = None
if description:
desc = _yaml.load(description, shortname=os.path.basename(description))
......@@ -235,8 +230,6 @@ def run_bst(directory, source_cache, description, palette, output, command):
command_str = _yaml.node_get(desc, str, 'command')
command = command_str.split()
height = _yaml.node_get(desc, str, 'height', default_value=None)
# The directory should be relative to where the description file was
# stored
directory_str = _yaml.node_get(desc, str, 'directory')
......@@ -312,9 +305,6 @@ def run_bst(directory, source_cache, description, palette, output, command):
# Now convert to HTML and add some surrounding sugar
div_style = 'font-size:x-small'
if height is not None:
div_style += ";height:{};overflow-y:auto".format(height)
converted = ansi2html(decoded, palette=palette)
converted = '<div class="highlight" style="{}">'.format(div_style) + \
'<pre>\n' + \
......
# Project directory
directory: ../examples/flatpak-autotools
# This takes a lot of space, limit it's height
height: '350px'
# Make sure it's fetched in the source cache
prepare-commands:
- fetch hello.bst
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment