Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create some demo use cases #11

Closed
4 of 6 tasks
alexpovel opened this issue Jul 19, 2022 · 4 comments
Closed
4 of 6 tasks

Create some demo use cases #11

alexpovel opened this issue Jul 19, 2022 · 4 comments
Assignees
Labels
documentation Improvements or additions to documentation
Milestone

Comments

@alexpovel
Copy link
Owner

alexpovel commented Jul 19, 2022

  • All targeted shells/programs:
    • curl
    • wget
    • PowerShell
  • all templates
  • all languages
@alexpovel alexpovel added the documentation Improvements or additions to documentation label Jul 19, 2022
@alexpovel alexpovel added this to the Initial release milestone Jul 19, 2022
@alexpovel alexpovel self-assigned this Jul 19, 2022
@alexpovel
Copy link
Owner Author

Can try out asciinema for that.

@alexpovel
Copy link
Owner Author

Some work towards this was done in 79c61a8.

@alexpovel
Copy link
Owner Author

79f20b8 can stand in as the 'mother of all demos', since it's a live showcase for anyone to try out. Let's scrap showcasing all templates and languages for now. Showcasing languages is boring and there's only one template 🤷

@alexpovel
Copy link
Owner Author

Done with 2e8de72, where a screenshot of the live demo was added, taken with/in:

  • curl 7.83.1.0

  • ancv 0.19.1

  • Windows Terminal

  • PowerShell 7

  • FiraCode Nerd Font

  • this Windows Terminal color scheme:

     {
         "background": "#263238",
         "black": "#000000",
         "blue": "#82AAFF",
         "brightBlack": "#546E7A",
         "brightBlue": "#82AAFF",
         "brightCyan": "#89DDFF",
         "brightGreen": "#C3E88D",
         "brightPurple": "#C792EA",
         "brightRed": "#FF5370",
         "brightWhite": "#FFFFFF",
         "brightYellow": "#FFCB6B",
         "cursorColor": "#FFFFFF",
         "cyan": "#89DDFF",
         "foreground": "#EEFFFF",
         "green": "#C3E88D",
         "name": "Material",
         "purple": "#C792EA",
         "red": "#FF5370",
         "selectionBackground": "#FFFFFF",
         "white": "#FFFFFF",
         "yellow": "#FFCB6B"
     },

    From that scheme, we know the background color (#263238). Taking a screenshot of the terminal (scaled way up for retina quality), we can then remove that background color: convert in.png -transparent "#263238" out.png, yielding a perfectly transparent PNG:

    out

    That can then be superimposed onto the prepared SVG terminal mock, yielding:

    out

    This method is still tedious and not entirely reproducible/automatable, but:

    • rich's save_svg is excellent but garbled emojis:

      Clipboard Image

    • other methods didn't work at all; having the output entirely SVG and not as a bitmap would be nice but it has too many pitfalls; only a bitmap can really display what's on screen, with no ambiguity as to how it's rendered (on GitHub, ...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant