pax_global_header00006660000000000000000000000064141041327470014515gustar00rootroot0000000000000052 comment=b5747fd3b66a34a8c8c1cee4af4baa8e72286849 images-0.9.4/000077500000000000000000000000001410413274700127745ustar00rootroot00000000000000images-0.9.4/.github/000077500000000000000000000000001410413274700143345ustar00rootroot00000000000000images-0.9.4/.github/workflows/000077500000000000000000000000001410413274700163715ustar00rootroot00000000000000images-0.9.4/.github/workflows/ci.yml000066400000000000000000000023151410413274700175100ustar00rootroot00000000000000name: CI on: [push, pull_request] jobs: test: name: Test Python ${{ matrix.python-version }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: python-version: - '2.7' - '3.6' - '3.7' - '3.8' - '3.9' - 'pypy-2.7' - 'pypy-3.7' steps: - uses: actions/checkout@v2 with: submodules: true - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Cache uses: actions/cache@v2 with: path: ~/.cache/pip key: pip-test-python-${{ matrix.python-version }}-${{ hashFiles('**/tox.ini', '**/setup.*') }} restore-keys: | pip-test-python-${{ matrix.python-version }}-${{ hashFiles('**/tox.ini', '**/setup.*') }} pip-test-python-${{ matrix.python-version }} pip-test- - name: Install dependencies run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox tox-gh-actions - name: Tox tests run: | tox images-0.9.4/.gitignore000066400000000000000000000001001410413274700147530ustar00rootroot00000000000000/docs/source/_images /docs/build /.tox *~ *pyc *egg* build dist images-0.9.4/.gitmodules000066400000000000000000000002271410413274700151520ustar00rootroot00000000000000[submodule "sphinxcontrib_images_lightbox2/lightbox2"] path = sphinxcontrib_images_lightbox2/lightbox2 url = https://github.com/lokesh/lightbox2.git images-0.9.4/.readthedocs.yml000066400000000000000000000011061410413274700160600ustar00rootroot00000000000000# .readthedocs.yml # Read the Docs configuration file # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details # Required version: 2 # Build documentation in the docs/ directory with Sphinx sphinx: configuration: docs/conf.py # Build documentation with MkDocs #mkdocs: # configuration: mkdocs.yml # Optionally build your docs in additional formats such as PDF and ePub formats: - htmlzip # Optionally set the version of Python and requirements required to build your docs python: version: 3.7 install: - requirements: docs/rtd-requirements.txt images-0.9.4/CHANGELOG.md000066400000000000000000000014201410413274700146020ustar00rootroot00000000000000# Changelog All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.9.4] - 2021-08-09 ### Changed - Updated the included Lightbox2 backend to version 2.11.3 and with it jQuery to version 3.4.1. ### Fixed - Issue where explicit targets for thumbnails were ignored. `.. _my target:` before a thumbnail directive would not make the thumbnail referenceable by `:ref:Title `. ## [0.9.3] - 2021-04-27 ### Fixed - Issue where adding package configuration options to conf.py (e.g. `images_config={'show_caption'=True}`) would cause incremental builds to stop working. images-0.9.4/LICENSE.txt000066400000000000000000000236751410413274700146340ustar00rootroot00000000000000 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS images-0.9.4/MANIFEST.in000066400000000000000000000011611410413274700145310ustar00rootroot00000000000000include readme.rst include sphinxcontrib_images_lightbox2/lightbox2/dist/images/close.png include sphinxcontrib_images_lightbox2/lightbox2/dist/images/loading.gif include sphinxcontrib_images_lightbox2/lightbox2/dist/images/next.png include sphinxcontrib_images_lightbox2/lightbox2/dist/images/prev.png include sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.js include sphinxcontrib_images_lightbox2/lightbox2/dist/js/lightbox-plus-jquery.min.map include sphinxcontrib_images_lightbox2/lightbox2/dist/css/lightbox.css include sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js images-0.9.4/README.rst000066400000000000000000000037441410413274700144730ustar00rootroot00000000000000sphinxcontrib-images ==================== sphinxcontrib-images (formerly `sphinxcontrib-fancybox `_). Easy thumbnails in Sphinx documentation (focused on HTML). * `Documentation `_ * `Repository (GitHub) `_ * `PyPI `_ * `GitHub actions `_ .. image:: https://github.com/sphinx-contrib/images/actions/workflows/ci.yml/badge.svg :target: https://github.com/sphinx-contrib/images/actions/workflows/ci.yml :alt: GitHub Actions Features -------- * Show thumbnails instead of full size images inside documentation (HTML). * Ability to zoom/enlarge picture using LightBox2 (HTML). * Ability to group pictures * Download remote pictures and keep it in cache (if requested) * Support for other formats (latex, epub, ... - fallback to image directive) * Easy to extend (add own backend in only few lines of code) * Add other HTML "preview" solution than LightBox2 * Add better support to non-HTML outputs * Preprocess images TODO ^^^^ * Make proper thumbnails (scale down images) How to install? --------------- Instalation through pip: :: pip install sphinxcontrib-images or through the GitHub: :: pip install git+https://github.com/sphinx-contrib/images Next, you have to add extension to ``conf.py`` in your Sphinx project. :: extensions = [ … 'sphinxcontrib.images', … ] How to use it? -------------- Example: :: .. thumbnail:: picture.png You can also override the default ``image`` directive provided by Sphinx. Check the documentation for all configuration options. Questions and suggestions ------------------------- If you have any suggstions, patches, problems - please use `GitHub Issues `_. images-0.9.4/docs/000077500000000000000000000000001410413274700137245ustar00rootroot00000000000000images-0.9.4/docs/Makefile000066400000000000000000000011721410413274700153650ustar00rootroot00000000000000# Minimal makefile for Sphinx documentation # # You can set these variables from the command line, and also # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = . BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) .PHONY: help Makefile # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) images-0.9.4/docs/_static/000077500000000000000000000000001410413274700153525ustar00rootroot00000000000000images-0.9.4/docs/_static/custom.css000066400000000000000000000000501410413274700173710ustar00rootroot00000000000000.framed img { border: 2px solid black;} images-0.9.4/docs/conf.py000066400000000000000000000043511410413274700152260ustar00rootroot00000000000000# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import os # import sys # sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- project = 'sphinxcontrib-images' copyright = u'2014, Tomasz Czyż' author = u'Tomasz Czyż' from sphinxcontrib import images version = images.__version__ # The full version, including alpha/beta/rc tags release = '1' # -- General configuration --------------------------------------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. source_suffix = '.rst' master_doc = 'index' extensions = [ 'sphinxcontrib.images', 'sphinx.ext.viewcode', ] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This pattern also affects html_static_path and html_extra_path. exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # -- Options for HTML output ------------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # html_theme = 'sphinxdoc' #html_theme_options = { } # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] html_css_files = ['custom.css'] images_config = dict(backend='LightBox2', default_image_width='200px' ) images-0.9.4/docs/img.jpg000066400000000000000000001116731410413274700152130ustar00rootroot00000000000000JFIFHHC     C  X" h   !"12ABQRa#7bqr3STWtu$8CVc &46Ue%'(5DdvEFf0!12Qa"ARSqBr ?`.pH ~P @@4 !R@z8W$|J[_ `[K" G⶿X C@PP v648!PB$!$TY/kfkf2M`ffwPyݎP$"30:nÌejj:V$ JFgf{ =SY=*+(4mA:@EN 3`̺v2>@ fP4XĽ&*UpxW"&B^\Dpi IJ"~ ?X H784{@8 @@rP54G=@9Auea8(Mt& 0]`)T48@AH(h/sL(@` H S&f>S Z(j*J[ 6s&\״WÅZ/ўlu<{N7" :*4KRY.~j⺭)eo%5-D.\!\h8rF) J_1RaNuOw9OWPdBE WG۴)YfyISsUknM5 >Ĩc\$1=ԙ8M9n DBFFRVQe:P^R=z H$I(^lC~]%6/\k^nNm:駼IB"16;m搴480%xj+a=ez7yҥde]7 WUccW-˶:Ju+QLZж̔M==: (hR (&M@;h@*Ca_?{h?HM< /)a>Z85{+pa`! k5kZ{v%B3$;[T"J@z L9u =|kv[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c=趜u] I -D}"im:5+Q`"5rƾӗ 4m^j :aӘ WIΠo 򐃱͹dpz.;1/- 5&D[~ǥbkoZ[ozүYDȨڴ:V8*0}M)Eܡķ()4Ԛbe,5tm/Hi:CB@O/+ @ jN?9BVOa;/zBVB(h7S1=P JT+L"n4P{fBtkv no$<~Aθk_*CV"ؔ@ HJK("B>ӹeGmkVW{\9\-l%\٤u5("! \mJg+ujlkֵu߷;eQʰVe;h NH!JW z݈ARWRƨ•cICjiȴ"Xs݋2,Z_.֣s:=n^Ih ;2w]x/KKN2P }gGBكV O4JueDg~Q33-BL\bIM)RU#!N 5łĕʔ JW)r :CTJ.c%=MG]Uֽn T橔IM6#3Ӗ`LX3<+K?۬VQͦf,images-0.9.4/docs/index.rst000066400000000000000000000240521410413274700155700ustar00rootroot00000000000000sphinxcontrib-images |version| ============================== Project home: ``_ PyPI: ``_ How to install? --------------- :: pip install sphinxcontrib-images Add extension to ``conf.py`` in your sphinx project. :: extensions = [ … 'sphinxcontrib.images', … ] How to configure? ----------------- You can configure behaviour using a dictionary with options placed in ``conf.py``:: images_config = { … } All available options with comments: :backend: (default: 'LightBox2') ``string`` or ``callable`` If ``string`` it has to be the name of the ``entrypoint`` registered in the ``sphinxcontrib.images.backend`` group (look at the source of ``setup.py`` in this project). Callable can be a function or a class which returns an instance of a backend to render images. The first argument is Sphinx's app instance. Go to LightBox2 backend to see how to implement that. Each backend should implement rendering ``image_node`` on specific outputs. If methods are not implemented, default ``image`` directive is a fallback. By default ``LightBox2`` backends natively support only HTML (other outputs are supported by fallback-image-directive). :override_image_directive: (default: ``False``) ``True`` or ``False``. It overrides the default Sphinx ``image`` directive with the ``thumbnail`` directive provided by this extension. :cache_path: (default :``_images``) Path, where to keep downloaded images. Relative to source (actually relative to ``conf.py``) directory or absolute path. :requests_kwargs: (default: ``{}``) Remote images are downloaded by `requests `_. This ``dict`` keeps the keyword arguments that will be passed to the ``get`` method. :default_image_width: (default: ``100%``) Default width of an image. Backend can use this setting to set width properly. :default_image_height: (default: ``auto``) Default height of an image. Backend can use this setting to set width properly. :default_group: (default: ``None``) This setting sets the default group for images without a defined group. If ``None`` each image is placed in a separate group, which means that images are not grouped by default. Otherwise you can set a group name like ``default`` to group all ungrouped images together. :default_show_title: (default: ``False``) Defines whether a caption below the picture should be visible or not. .. warning:: Currently this options does not work, I have no idea how to enable this feature in lightbox2. If you have any idea please do a pull request. :download: (default: ``True``) Download remote images. Thumbnail directive ------------------- You can use it like:: .. thumbnail:: path/to/image.jpg or:: .. thumbnail:: http://remote/image.jpg You can pass options like regular Sphinxs' directives:: .. thumbnail:: http://remote/image.jpg :download: true All available arguments: :group: If you set the same group for different images the backend can *group* them. :class: This can be used by the backend to apply some style. The straightforward use case is to define HTML classes here (LightBox2 backend puts these classes on outer ``a`` element, not inner ``img``). :width: Backend can use this option to set the width of the image. This overrides ``default_image_width`` from configuration. Values like: * percentage ``100%`` * length with unit ``100px`` * ``auto`` are accepted. :height: Backend can use this option to set the height of the image. This overrides ``default_image_height`` from configuration. Values like: * length with unit: ``100px`` * ``auto`` are accepted. :alt: If image cannot be displayed, this text will be shown. :download: This overrides ``download`` from configuration. You can set for particular image to download it or not. Works only for remote images. :title: * If you do not define it, ``default_show_title`` configuration option will be used (it will define whether to show title or not). * If you define this option but leave it empty, the content of the directive will be used as the title:: .. thumbnail:: image.jpg :title: This will be a title * If you define this option as text, it will be used as title:: .. thumbnail:: image.jpg :title: This is title This is description It's up to the backend, how this will be displayed. Currently I have a problem with LightBox2 to make captions below thumbnails. If you have any idea how to solve it please write. :align: (default: '') Align the picture. LightBox2 backend uses ``align-`` Sphinx html classes. By default alignment is not used at all. Values like: * ``left`` * ``center`` * ``right`` are accepted. .. note:: You may want to wrap aligned element with:: .. container:: clearfix to fix document flow. :show_caption: (default: ``False``) Show the title as a caption below the image. .. warning:: Enabling the caption nests the clickable image inside an HTML ``figure`` which gets the class if defined. This mays break existing styles. To solve styles compatibility issues, you may use the *legacy_class* argument. :legacy_class: Only applicable when *show_caption* is ``True``. The classese specified are added to the clickable image. The ``figure`` HTML element still gets the classes specified by the *class* argument. Examples -------- Thumbnail ^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg .. thumbnail:: img.jpg Remote image (http) ^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: http://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: false .. thumbnail:: http://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: false Remote image (https) ^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: false .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: false Remote image (download http) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The image is downloaded and placed in `_build/html/_images` (for html build) making it availble locally. .. sourcecode:: rst .. thumbnail:: http://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: true .. thumbnail:: http://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: true Remote image (download https) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The image is downloaded and placed in `_build/html/_images` (for html build) making it availble locally. .. sourcecode:: rst .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: true .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :download: true Image with forced dimensions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg :width: 300px :height: 100px .. thumbnail:: img.jpg :width: 300px :height: 100px Image with additional class ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg :class: framed .. thumbnail:: img.jpg :class: framed .. note:: Requires a custom `custom css file`_ with a rule like: .. sourcecode:: css .framed img { border: 2px solid black;} .. _custom css file: https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-html_css_files Image with description ^^^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg Descriptive description. .. thumbnail:: img.jpg Descriptive description. .. seealso:: :ref:`sec-caption-title` Image alternative text ^^^^^^^^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: http://a.b/non_existing_image.png :alt: Cannot load this photo, but believe me it is nice. .. thumbnail:: http://a.b/non_existing_image.png :alt: Cannot load this photo, but believe me it's nice. Group images ^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg :group: group1 .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :group: group1 .. thumbnail:: img.jpg :group: group1 .. thumbnail:: https://upload.wikimedia.org/wikipedia/meta/0/08/Wikipedia-logo-v2_1x.png :group: group1 Alignment ^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg :align: center .. thumbnail:: img.jpg :align: center .. _sec-caption-title: Caption / title ^^^^^^^^^^^^^^^ .. sourcecode:: rst .. thumbnail:: img.jpg :title: Some title / caption. .. thumbnail:: img.jpg :title: Some title / caption. :show_caption: True .. thumbnail:: img.jpg :title: Some title / caption. .. thumbnail:: img.jpg :title: Some nice title to the picture. :show_caption: True Reference via explicit target ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Thumbnails can not, at present, be numbered like figures, hence they can not be referenced by `:numref:`, but they can be referenced by `:ref:`. .. sourcecode:: rst This is a reference to a thumbnail: :ref:`A thumbnail`. Scroll until the image is not visible before clicking the link to see the effect. .. _my target: .. thumbnail:: img.jpg This is a reference to a thumbnail: :ref:`A thumbnail`. Scroll until the image is not visible before clicking the link to see the effect. .. _my target: .. thumbnail:: img.jpg Indices and tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search` images-0.9.4/docs/make.bat000066400000000000000000000014331410413274700153320ustar00rootroot00000000000000@ECHO OFF pushd %~dp0 REM Command file for Sphinx documentation if "%SPHINXBUILD%" == "" ( set SPHINXBUILD=sphinx-build ) set SOURCEDIR=. set BUILDDIR=_build if "%1" == "" goto help %SPHINXBUILD% >NUL 2>NUL if errorlevel 9009 ( echo. echo.The 'sphinx-build' command was not found. Make sure you have Sphinx echo.installed, then set the SPHINXBUILD environment variable to point echo.to the full path of the 'sphinx-build' executable. Alternatively you echo.may add the Sphinx directory to PATH. echo. echo.If you don't have Sphinx installed, grab it from echo.http://sphinx-doc.org/ exit /b 1 ) %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% goto end :help %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% :end popd images-0.9.4/docs/rtd-requirements.txt000066400000000000000000000000251410413274700177740ustar00rootroot00000000000000sphinxcontrib-images images-0.9.4/release-to-pypi.sh000077500000000000000000000054501410413274700163560ustar00rootroot00000000000000#!/bin/sh V1=$(sed -nE "s/^.*version.*=.*([0-9]+\.[0-9]+\.[0-9]+(\.[a-z0-9]+)?).*$/\1/p" setup.py) V2=$(sed -nE "s/^.*version.*=.*([0-9]+\.[0-9]+\.[0-9]+(\.[a-z0-9]+)?).*$/\1/p" sphinxcontrib/images.py) SUB=$(git submodule status sphinxcontrib_images_lightbox2/lightbox2 | cut -c1) printf "\n## RELEASE SPHINXCONTRIB-IMAGES TO PYPI ##\n\n" printf "# VERSION CHECK #\n" printf "setup.py: %s\n" "$V1" printf "sphinxcontrib/images.py: %s\n" "$V2" if [ "$V1" != "$V2" ]; then printf "ERROR: versions do _not_ match\n\n" else printf "SUCCESS: Versions match\n\n" fi printf "# SUBMODULE STATUS #\n" if [ "$SUB" = "-" ]; then echo "ERROR: lightbox2 submodule _not_ initialized" else echo "SUCCESS: lightbox2 submodule initialized" fi read -p "Press any key to proceed to instructions ..." -n1 -s cat < 0.9.3.pre1 and 0.9.3 > 0.9.3.pre2 STEPS images-0.9.4/setup.cfg000066400000000000000000000000341410413274700146120ustar00rootroot00000000000000[bdist_wheel] universal = 1 images-0.9.4/setup.py000077500000000000000000000040161410413274700145120ustar00rootroot00000000000000#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import codecs from setuptools import setup, find_packages setup( name='sphinxcontrib-images', version='0.9.4', url='https://github.com/sphinx-contrib/images', download_url='https://pypi.python.org/pypi/sphinxcontrib-images', project_urls={ 'Bug Tracker': 'https://github.com/sphinx-contrib/images/issues', 'Documentation': 'https://sphinxcontrib-images.readthedocs.io/', }, license='Apache 2', author=u'Tomasz Czyż', author_email='tomasz.czyz@gmail.com', description='Sphinx extension for thumbnails', long_description=codecs.open('README.rst', encoding="utf8").read(), zip_safe=False, classifiers=[ 'Development Status :: 4 - Beta', 'Environment :: Console', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Topic :: Documentation', ], entry_points={ 'console_scripts':[ 'sphinxcontrib-images=sphinxcontrib.images:main', ], 'sphinxcontrib.images.backend':[ 'LightBox2 = sphinxcontrib_images_lightbox2:LightBox2', 'FakeBackend = sphinxcontrib_images_lightbox2:LightBox2', ] }, platforms='any', packages=find_packages(), include_package_data=True, setup_requires=['wheel'], install_requires=['sphinx>=1.8.5,<2.0;python_version<"3.0"', 'sphinx>=2.0;python_version>="3.0"', 'requests>2.2,<3'], namespace_packages=['sphinxcontrib'], ) images-0.9.4/sphinxcontrib/000077500000000000000000000000001410413274700156665ustar00rootroot00000000000000images-0.9.4/sphinxcontrib/__init__.py000066400000000000000000000005561410413274700200050ustar00rootroot00000000000000# -*- coding: utf-8 -*- """ sphinxcontrib ~~~~~~~~~~~~~ This package is a namespace package that contains all extensions distributed in the ``sphinx-contrib`` distribution. :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ __import__('pkg_resources').declare_namespace(__name__) images-0.9.4/sphinxcontrib/images.py000066400000000000000000000310461410413274700175110ustar00rootroot00000000000000# -*- coding: utf-8 -*- __version__ = '0.9.4' __author__ = 'Tomasz Czyż ' __license__ = "Apache 2" import os import sys import copy import uuid import hashlib import argparse import functools import pkg_resources import sphinx from sphinx.util.osutil import copyfile try: from sphinx.util import logging logger = logging.getLogger(__name__) except ImportError: logger = None try: from sphinx.util.compat import Directive except: from docutils.parsers.rst import Directive try: from sphinx.util import status_iterator except ImportError: pass from sphinx.util.console import brown from sphinx.util.osutil import ensuredir from docutils import nodes from docutils.parsers.rst import directives import requests STATICS_DIR_NAME = '_static' DEFAULT_CONFIG = dict( backend='LightBox2', default_image_width='100%', default_image_height='auto', default_group=None, default_show_title=False, download=True, requests_kwargs={}, cache_path='_images', override_image_directive=False, show_caption=False, ) class Backend(object): STATIC_FILES = () def __init__(self, app): self._app = app def visit_image_node_fallback(self, writer, node): writer.visit_image(node) def depart_image_node_fallback(self, writer, node): writer.depart_image(node) class image_node(nodes.image, nodes.General, nodes.Element): pass class gallery_node(nodes.image, nodes.General, nodes.Element): pass def directive_boolean(value): if not value.strip(): raise ValueError("No argument provided but required") if value.lower().strip() in ["yes", "1", 1, "true", "ok"]: return True elif value.lower().strip() in ['no', '0', 0, 'false', 'none']: return False else: raise ValueError(u"Please use on of: yes, true, no, false. " u"Do not use `{}` as boolean.".format(value)) class ImageDirective(Directive): ''' Directive which overrides default sphinx directive. It's backward compatibile and it's adding more cool stuff. ''' align_values = ('left', 'center', 'right') def align(argument): # This is not callable as self.align. We cannot make it a # staticmethod because we're saving an unbound method in # option_spec below. return directives.choice(argument, ImageDirective.align_values) has_content = True required_arguments = True option_spec = { 'width': directives.length_or_percentage_or_unitless, 'height': directives.length_or_unitless, 'strech': directives.choice, 'group': directives.unchanged, 'class': directives.class_option, # or str? 'alt': directives.unchanged, 'download': directive_boolean, 'title': directives.unchanged, 'align': align, 'show_caption': directive_boolean, 'legacy_class': directives.class_option, } def run(self): env = self.state.document.settings.env conf = env.app.config.images_config #TODO get defaults from config group = self.options.get('group', conf['default_group'] if conf['default_group'] else uuid.uuid4()) classes = self.options.get('class', '') width = self.options.get('width', conf['default_image_width']) height = self.options.get('height', conf['default_image_height']) alt = self.options.get('alt', '') title = self.options.get('title', '' if conf['default_show_title'] else None) align = self.options.get('align', '') show_caption = self.options.get('show_caption', False) legacy_classes = self.options.get('legacy_class', '') #TODO get default from config download = self.options.get('download', conf['download']) # parse nested content #TODO: something is broken here, not parsed as expected description = nodes.paragraph() content = nodes.paragraph() content += [nodes.Text(u"%s" % x) for x in self.content] self.state.nested_parse(content, 0, description) img = image_node() if self.is_remote(self.arguments[0]): img['remote'] = True if download: img['uri'] = os.path.join('_images', hashlib.sha1(self.arguments[0].encode()).hexdigest()) img['remote_uri'] = self.arguments[0] env.remote_images[img['remote_uri']] = img['uri'] env.images.add_file('', img['uri']) else: img['uri'] = self.arguments[0] img['remote_uri'] = self.arguments[0] else: img['uri'] = self.arguments[0] img['remote'] = False env.images.add_file('', img['uri']) img['content'] = description.astext() if title is None: img['title'] = '' elif title: img['title'] = title else: img['title'] = img['content'] img['content'] = '' img['show_caption'] = show_caption img['legacy_classes'] = legacy_classes img['group'] = group img['size'] = (width, height) img['classes'] += classes img['alt'] = alt img['align'] = align return [img] def is_remote(self, uri): uri = uri.strip() env = self.state.document.settings.env app_directory = os.path.dirname(os.path.abspath(self.state.document.settings._source)) if sphinx.__version__.startswith('1.1'): app_directory = app_directory.decode('utf-8') if uri[0] == '/': return False if uri[0:7] == 'file://': return False if os.path.isfile(os.path.join(env.srcdir, uri)): return False if os.path.isfile(os.path.join(app_directory, uri)): return False if '://' in uri: return True raise ValueError('Image URI `{}` have to be local relative or ' 'absolute path to image, or remote address.' .format(uri)) def install_backend_static_files(app, env): STATICS_DIR_PATH = os.path.join(app.builder.outdir, STATICS_DIR_NAME) dest_path = os.path.join(STATICS_DIR_PATH, 'sphinxcontrib-images', app.sphinxcontrib_images_backend.__class__.__name__) files_to_copy = app.sphinxcontrib_images_backend.STATIC_FILES for source_file_path in (app.builder.status_iterator if hasattr(app.builder, 'status_iterator') else status_iterator)( files_to_copy, 'Copying static files for sphinxcontrib-images...', brown, len(files_to_copy)): dest_file_path = os.path.join(dest_path, source_file_path) if not os.path.exists(os.path.dirname(dest_file_path)): ensuredir(os.path.dirname(dest_file_path)) source_file_path = os.path.join(os.path.dirname( sys.modules[app.sphinxcontrib_images_backend.__class__.__module__].__file__), source_file_path) copyfile(source_file_path, dest_file_path) if dest_file_path.endswith('.js'): app.add_js_file(os.path.relpath(dest_file_path, STATICS_DIR_PATH)) elif dest_file_path.endswith('.css'): app.add_css_file(os.path.relpath(dest_file_path, STATICS_DIR_PATH)) def download_images(app, env): conf = app.config.images_config for src in (app.builder.status_iterator if hasattr(app.builder, 'status_iterator') else status_iterator)( env.remote_images, 'Downloading remote images...', brown, len(env.remote_images)): dst = os.path.join(env.srcdir, env.remote_images[src]) if not os.path.isfile(dst): logger.info('{} -> {} (downloading)' .format(src, dst)) with open(dst, 'wb') as f: # TODO: apply reuqests_kwargs try: f.write(requests.get(src, **conf['requests_kwargs']).content) except requests.ConnectionError: logger.info("Cannot download `{}`".format(src)) else: logger.info('{} -> {} (already in cache)' .format(src, dst)) def update_config(app, config): '''Ensure all config values are defined''' merged = copy.deepcopy(DEFAULT_CONFIG) merged.update(config.images_config) config.images_config = merged def configure_backend(app): config = app.config.images_config ensuredir(os.path.join(app.env.srcdir, config['cache_path'])) # html builder # self.relfn2path(imguri, docname) backend_name_or_callable = config['backend'] if isinstance(backend_name_or_callable, str): try: backend = list(pkg_resources.iter_entry_points( group='sphinxcontrib.images.backend', name=backend_name_or_callable))[0] backend = backend.load() except IndexError: raise IndexError("Cannot find sphinxcontrib-images backend " "with name `{}`.".format(backend_name_or_callable)) elif callable(backend_name_or_callable): pass else: raise TypeError("sphinxcontrib-images backend is configured " "improperly. It has to be a string (name of " "installed backend) or callable which returns " "backend instance but is `{}` (type:`{}`). Please read " "sphinxcontrib-images documentation for " "more informations." .format(backend_name_or_callable, type(backend_name_or_callable))) try: backend = backend(app) except TypeError as error: logger.info('Cannot instantiate sphinxcontrib-images backend `{}`. ' 'Please, select correct backend. Available backends: {}.' .format(config['backend'], ', '.join(ep.name for ep in pkg_resources.iter_entry_points(group='sphinxcontrib.images.backend')) )) raise SystemExit(1) # remember the chosen backend for processing. Env and config cannot be used # because sphinx try to make a pickle from it. app.sphinxcontrib_images_backend = backend logger.info('Initiated sphinxcontrib-images backend: ', nonl=True) logger.info('`{}`'.format(str(backend.__class__.__module__ + ':' + backend.__class__.__name__))) def backend_methods(node, output_type): def backend_method(f): @functools.wraps(f) def inner_wrapper(writer, node): return f(writer, node) return inner_wrapper signature = '_{}_{}'.format(node.__name__, output_type) return (backend_method(getattr(backend, 'visit' + signature, getattr(backend, 'visit_' + node.__name__ + '_fallback'))), backend_method(getattr(backend, 'depart' + signature, getattr(backend, 'depart_' + node.__name__ + '_fallback')))) # add new node to the stack # connect backend processing methods to this node app.add_node(image_node, **{output_type: backend_methods(image_node, output_type) for output_type in ('html', 'latex', 'man', 'texinfo', 'text', 'epub')}) app.add_directive('thumbnail', ImageDirective) if config['override_image_directive']: app.add_directive('image', ImageDirective) app.env.remote_images = {} def setup(app): app.require_sphinx('1.0') app.add_config_value('images_config', {}, 'env') app.connect('config-inited', update_config) app.connect('builder-inited', configure_backend) app.connect('env-updated', download_images) app.connect('env-updated', install_backend_static_files) global logger if logger is None: logger = app return {'version': sphinx.__version__, 'parallel_read_safe': True} def main(args=sys.argv[1:]): ap = argparse.ArgumentParser() ap.add_argument("command", choices=['show-backends']) args = ap.parse_args(args) if args.command == 'show-backends': backends = pkg_resources.iter_entry_points(group='sphinxcontrib.images.backend') if backends: for backend in backends: print ('- {0.name} (from `{0.dist}` package)'.format(backend)) else: print ('No backends installed') images-0.9.4/sphinxcontrib_images_lightbox2/000077500000000000000000000000001410413274700211755ustar00rootroot00000000000000images-0.9.4/sphinxcontrib_images_lightbox2/__init__.py000066400000000000000000000000421410413274700233020ustar00rootroot00000000000000 from .lightbox2 import LightBox2 images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2/000077500000000000000000000000001410413274700230775ustar00rootroot00000000000000images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/000077500000000000000000000000001410413274700251175ustar00rootroot00000000000000images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2-customize/jquery-noconflict.js000066400000000000000000000000321410413274700311230ustar00rootroot00000000000000 jQuery.noConflict(true); images-0.9.4/sphinxcontrib_images_lightbox2/lightbox2.py000066400000000000000000000052311410413274700234520ustar00rootroot00000000000000 import os from sphinxcontrib import images class LightBox2(images.Backend): STATIC_FILES = ( 'lightbox2/dist/images/close.png', 'lightbox2/dist/images/next.png', 'lightbox2/dist/images/prev.png', 'lightbox2/dist/images/loading.gif', 'lightbox2/dist/js/lightbox-plus-jquery.min.js', 'lightbox2/dist/js/lightbox-plus-jquery.min.map', 'lightbox2/dist/css/lightbox.css', 'lightbox2-customize/jquery-noconflict.js' ) def visit_image_node_html(self, writer, node): # make links local (for local images only) builder = self._app.builder if node['uri'] in builder.images: node['uri'] = '/'.join([builder.imgpath, builder.images[node['uri']]]) if node['show_caption'] is True: writer.body.append( u'''
'''.format(cls=' '.join(node['classes']),)) if node['legacy_classes']: writer.body.append( u''''''.format( group='group-%s' % node['group'] if node['group'] else node['uri'], href=node['uri'], title=node['title'] + node['content'], # Only one id attribute is meaningful id = 'id="' + node['ids'][0] + '"' if len(node['ids'])>0 else '' )) writer.body.append( '''{alt} '''.format(src=node['uri'], cls='align-%s' % node['align'] if node['align'] else '', width=node['size'][0], height=node['size'][1], alt=node['alt'], title=node['title'])) def depart_image_node_html(self, writer, node): writer.body.append('') if node['show_caption'] is True: writer.body.append(u'''
{title}
'''.format(title=node['title'],)) writer.body.append('
') images-0.9.4/tox.ini000066400000000000000000000013211410413274700143040ustar00rootroot00000000000000[tox] envlist = {py35,py36,py37,py38,py39,pypy3}-sphinx{201,212,222,231,244,300,321,latest} {py27, pypy2}-sphinx{185} [testenv] minversion = 3.15.0 whitelist_externals = make commands = ./setup.py bdist_wheel ./setup.py install make -C docs html deps = pip setuptools sphinx-rtd-theme==0.1.6 sphinx185: sphinx==1.8.5 sphinx201: sphinx==2.0.1 sphinx212: sphinx==2.1.2 sphinx222: sphinx==2.2.2 sphinx231: sphinx==2.3.1 sphinx244: sphinx==2.4.4 sphinx300: sphinx==3.0.0 sphinx321: sphinx==3.2.1 sphinxlatest: sphinx wheel [gh-actions] python = 2.7: py27 3.6: py36 3.7: py37 3.8: py38 3.9: py39 pypy-2: pypy2 pypy-3: pypy3