click icon indicating copy to clipboard operation
click copied to clipboard

Add Screenshot workflow

Open Rowlando13 opened this issue 3 months ago • 9 comments

In a few places in the docs, it would be really nice to be able to run some code take a screen shot, and draw boxes around different parts. For example setup an example click app with multiple sub commands, options, epilog help, and arguments and then draw boxes and label the various blocks. Requirements:

  • run locally for doc generation (actually locally not calling out to api)
  • run in ci job (not calling out to external service)
  • No added dependencies that are not pip installable
  • have the screen shots not be blurry (common problem)
  • draw boxes around various sections.

Conduct some research and propose some options. A maintainer will pick from the options. and you can implement it. Here is an example of what I was thinking is in the comments below.

Rowlando13 avatar Sep 22 '25 20:09 Rowlando13

I'm not clear why we need screenshots for this? Code and CLI invocations are entirely text based. This would add a huge amount of complexity to our docs builds.

If you want to call out certain lines in a block of text, you can do that with Sphinx already: https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-option-code-block-emphasize-lines

davidism avatar Sep 22 '25 21:09 davidism

It's definitely not a need. More of it would be very nice. See the attached screenshot. The best way I can think to give an overview for a help page if you are unfamiliar with command line help pages would be to show a lot on a help page and box and label it. Gives a very nice overview. image

Rowlando13 avatar Sep 23 '25 01:09 Rowlando13

There are a few other places, I had in mind to use it.

Rowlando13 avatar Sep 23 '25 01:09 Rowlando13

I was planning on looking at the options and seeing. An option might be nothing is worth it.

Rowlando13 avatar Sep 23 '25 01:09 Rowlando13

  • draw boxes around various sections.

I guess you want to do what @janluke did to highlight the different parts of the help screen in Cloup:

Image

Source: https://cloup.readthedocs.io/en/stable/pages/formatting.html#themes

kdeldycke avatar Sep 23 '25 13:09 kdeldycke

Yes. I have never seen this, but I was thinking this exactly.

Rowlando13 avatar Sep 23 '25 14:09 Rowlando13

Another requirement: This must not pull in any external dependencies/build dependencies. Users and contributors need to be able to build the docs without more overhead.

The easiest way here is to take a screenshot and edit it.

davidism avatar Sep 23 '25 14:09 davidism

I assume fine as long as pip installable?

Rowlando13 avatar Sep 23 '25 19:09 Rowlando13

As long as it's pip installable without requiring external things like imagemagick being installed on the system.

davidism avatar Sep 23 '25 20:09 davidism