Commit 5774040d authored by Adrian DC's avatar Adrian DC
Browse files

chore: docs: refactor the 'Preview' job into a 'termtosvg' job

parent c66bb664
Loading
Loading
Loading
Loading
+6 −5
Changes for .gitlab-ci.yml: 6 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ variables:
    - sudo pip3 install -r requirements/deploy.txt --upgrade
    - sudo pip3 install -r requirements/quality.txt --upgrade
    - sudo pip3 install -r requirements/tests.txt --upgrade
    - sudo pip3 install -r requirements/docs.txt --upgrade
  only:
    - local

@@ -71,12 +72,12 @@ variables:

'Preview':
  stage: development
  image: local:silent
  before_script:
    - pip3 install -q dist/*.whl 2>/dev/null
    - pip3 install -q -r requirements/docs.txt --upgrade 2>/dev/null
    - pip3 install -q -r requirements/tests.txt --upgrade 2>/dev/null
  script:
    - for i in $(seq 1 100); do echo ' '; done
    - sleep 3
    - python3 ./docs/preview.py
    - sleep 10
    - pexpect-executor -- termtosvg ./docs/preview.svg -c 'python3 ./docs/preview.py' -g 80x24 -t ./docs/template.svg
  only:
    - local

+2 −2
Changes for README.md: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ is the common and unique interface between GitLab CI and gitlabci-local.

## Preview

![preview.gif](https://gitlab.com/AdrianDC/gitlabci-local/raw/2.3.0/docs/preview.gif)
![preview.svg](https://gitlab.com/AdrianDC/gitlabci-local/raw/2.3.0/docs/preview.svg)

---

@@ -319,9 +319,9 @@ JOB_NAME:
- [git-chglog](https://github.com/git-chglog/git-chglog): CHANGELOG generator
- [gitlab-release](https://pypi.org/project/gitlab-release/): Utility for publishing on GitLab
- [OCI](https://opencontainers.org): Open Container Initiative
- [peek](https://github.com/phw/peek): Simple GIF screen recorder
- [pexpect-executor](https://pypi.org/project/pexpect-executor/): Automate interactive CLI tools actions
- [PyPI](https://pypi.org/): The Python Package Index
- [termtosvg](https://pypi.org/project/termtosvg/): Record terminal sessions as SVG animations
- [Termux](https://termux.com): Linux terminal emulator on Android
- [twine](https://pypi.org/project/twine/): Utility for publishing on PyPI
- [winpty](https://github.com/rprichard/winpty): Windows PTY interface wrapper

docs/preview.gif

deleted100644 → 0
−1.19 MiB
Loading image diff...

docs/preview.svg

0 → 100644
+236 −0

File added.

Preview size limit exceeded, changes collapsed.

docs/template.svg

0 → 100644
+54 −0
Changes for docs/template.svg: 54 added lines, 0 removed lines.
Original line number Diff line number Diff line
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="terminal" baseProfile="full" viewBox="0 0 676 345" width="676" version="1.1">
    <defs>
        <termtosvg:template_settings xmlns:termtosvg="https://github.com/nbedos/termtosvg">
            <termtosvg:screen_geometry columns="82" rows="19"/>
            <termtosvg:animation type="css"/>
        </termtosvg:template_settings>
        <style type="text/css" id="generated-style"></style>
        <style type="text/css" id="user-style">
            /* The colors defined below are the default 16 colors used for rendering text of the terminal. Adjust
               them as needed.
               ubuntu colors based on https://en.wikipedia.org/wiki/ANSI_escape_code#Colors */
            .foreground {fill: #e5e5e5;}
            .background {fill: #000000;}
            .color0 {fill: #000000;}
            .color1 {fill: #cd0000;}
            .color2 {fill: #00cd00;}
            .color3 {fill: #cdcd00;}
            .color4 {fill: #0000ee;}
            .color5 {fill: #cd00cd;}
            .color6 {fill: #00cdcd;}
            .color7 {fill: #e5e5e5;}
            .color8 {fill: #7f7f7f;}
            .color9 {fill: #ff0000;}
            .color10 {fill: #00ff00;}
            .color11 {fill: #ffff00;}
            .color12 {fill: #5c5cff;}
            .color13 {fill: #ff00ff;}
            .color14 {fill: #00ffff;}
            .color15 {fill: #ffffff;}

            #terminal {border-radius: 5px; overflow:hidden;}

            @keyframes progress-bar-animation {
                from {
                    transform: translate(0px, calc(100% - 5px)) scale(0, 1);
                }
                to {
                    transform: translate(0px, calc(100% - 5px)) scale(1, 1);
                }
            }
            #progress-bar {
                animation-duration: var(--animation-duration);
                animation-iteration-count: infinite;
                animation-name: progress-bar-animation;
                animation-timing-function: linear;
                fill: #2083dd;
                transform-origin: left;
            }
        </style>
    </defs>
    <rect id="terminalui" class="background" width="100%" height="100%" />
    <svg id="screen" width="656" height="323" x="10" y="10" viewBox="0 0 656 323" preserveAspectRatio="xMidYMin slice"></svg>
    <rect id="progress-bar" width="100%" height="5"/>
</svg>
Loading