bobbyiliev / introduction-to-docker-ebook

Free Introduction to Docker eBook
https://docker.bobby.sh
MIT License
268 stars 65 forks source link

Feature: styled terminal output screenshot #4

Open cristianofromagio opened 2 years ago

cristianofromagio commented 2 years ago

Is your feature request related to a problem? Please describe.

The screenshots of the terminal output, although it serves it purpose (to display a real example), seems a little out of place. To attribute a familiar design to it (like a window frame) might be easier for the reader to situate itself.

Describe the solution you'd like

We may use a tool like https://carbon.now.sh/ to generate images from the text in the current screenshots. We can customize font family, font size, colors and even syntax highlight (although for terminal "output" it might be a bit wrong when using ie. bash ou powershell as language option).

Additional context

A simple example for:

root@docker:~# docker version
Client:
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.8
 Git commit:        20.10.7-0ubuntu1~21.04.2
 Built:             Fri Oct 1 03:50:45 2021
 Os/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.8
  Git commit:       20.10.7-0ubuntu1~21.04.2
  Built:            Fri Oct 1 02:50:01 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.2-0ubuntu1~21.04.3
  GitCommit:
 runc
  Version:          1.0.0~rc95-0ubuntu1~21.04.2
  GitCommit:
 docker-init:
  Version:          0.19.0
  GitCommit:

Currently

image

Carbon generated

If you consider replacing the images like so, I volunteer to generate them and PR the new ones.

bobbyiliev commented 2 years ago

Hi @cristianofromagio this is a great idea! Would be awesome if you had the time to do that!

cristianofromagio commented 2 years ago

Hello @bobbyiliev, it is me again! Sorry for the super late get back to this feature but you know, life gets in the way sometimes...

Anyways, I've been tinkering with a solution for this and now gonna list what I've managed to get sorted. First of all, this was really fun to research and build until now!

Goals

I've set that this feature should at least be able to be somewhat automated, meaning we should be doing the bare minimal of manual setting.

Tested solutions

Open to see some outputs from Carbon ![docker-status](https://user-images.githubusercontent.com/16294559/185567988-9f0fac04-2e86-4ec7-a99d-e320338b4065.png) ![docker-version](https://user-images.githubusercontent.com/16294559/185567931-328b1bde-7706-4a16-b2eb-581dcdb34b0a.png)
Open to see some outputs from Prism ![127 0 0 1_5500_md-generate_output html (2)](https://user-images.githubusercontent.com/16294559/185568391-168a7b4f-590f-4760-bf12-f63ba0a692d2.png) ![127 0 0 1_5500_md-generate_output html (4)](https://user-images.githubusercontent.com/16294559/185568419-6f886f20-2112-423e-aac1-4746ac40e7fd.png) ![127 0 0 1_5500_md-generate_output html (3)](https://user-images.githubusercontent.com/16294559/185568434-48798431-60dd-4f41-ba39-114f076f6630.png)

Suggestions

After all this report, what I got to say is that I don't know how to finish this feature. My main suggestion is that we generate the terminal output images using the Prism project I made, replace the old images with the new styled ones and then run the PDF through PDF OCR so we can have the styling without losing the functionality of selecting the text.

My question now is: what do? How can we finish this feature? I'm gonna need some help with this. I could make the Marked+Prism little project available or incorporate it inside the project. Or just create the images and we get going. What do you think is the best for the project? @bobbyiliev

And again, sorry for the late feedback. This was really fun to piece together!

bobbyiliev commented 2 years ago

You are an absolute legend @cristianofromagio! Thank you so much for putting this together! I will use this as a blueprint and take it from here!