sphinx-contrib / images

sphinxcontrib-images extension
Apache License 2.0
17 stars 14 forks source link

impossible to build doc using * #30

Open 12rambau opened 2 years ago

12rambau commented 2 years ago

I want to build my documentation using GIF images. GIF are natively not supported by latex. a wrokaround suggested by the sphinx team is the following:

Sphinx extends the standard docutils behavior by allowing an asterisk for the extension:

.. image:: gnu.*

Sphinx then searches for all images matching the provided pattern and determines their type. Each builder then chooses the best image out of these candidates. For instance, if the file name gnu.* was given and two files gnu.pdf and gnu.png existed in the source tree, the LaTeX builder would choose the former, while the HTML builder would prefer the latter. Supported image types and choosing priority are defined at Available builders.

When I try to use this method with the lib I get the following error:

ValueError: Image URI `_images/google.*` have to be local relative or absolute path to image, or remote address.

It's coming from this function that doesn't test for "*" files.

jonascj commented 1 year ago

@12rambau Let us investigate this. Would you submit a minimal working example showcasing this error? Otherwise I'll try to replicate the problem you describe.

12rambau commented 1 year ago

I had one when I published the issue I'll try to find it back. If not I think I can create one super easily