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

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
Loading
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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
+0 −10
Original line number Diff line number Diff line
@@ -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' + \
+0 −3
Original line number Diff line number Diff line
# 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
+14 −14

File changed.

Preview size limit exceeded, changes collapsed.