Skip to content

Commit

Permalink
add png conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
bckohan committed Dec 17, 2023
1 parent acce413 commit 7aeced5
Show file tree
Hide file tree
Showing 3 changed files with 203 additions and 94 deletions.
7 changes: 5 additions & 2 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ but if your goal is to greatly customize the generated documentation
sphinx-click_ may be more appropriate and will also work for Typer_ commands.

Installation
============
------------

Install with pip::

Expand All @@ -36,7 +36,7 @@ Add ``sphinxcontrib.typer`` to your ``conf.py`` file:
]
Usage
=====
-----

Say you have a command in the file ``examples/example.py`` that looks like
this:
Expand All @@ -61,13 +61,15 @@ This would generate html that looks like this:
:prog: example
:width: 70
:preferred: html
:convert-png: latex


You could change ``:preferred:`` to svg, to generate svg instead:

.. typer:: examples.example.app
:prog: example
:preferred: svg
:convert-png: latex

|
Expand All @@ -77,6 +79,7 @@ Or to text:
:prog: example
:preferred: text
:width: 93
:convert-png: latex


The ``typer`` directive has options for generating docs for all subcommands as
Expand Down
Binary file modified example.html.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7aeced5

Please sign in to comment.