pelican-thumbnailer


Namepelican-thumbnailer JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryThumbnailer is a Pelican plugin creates smaller versions of images found in a directory
upload_time2024-01-23 15:52:39
maintainer
docs_urlNone
author
requires_python<4.0,>=3.8.1
licenseAGPL-3.0
keywords pelican plugin image thumbnail picture pillow resize
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Thumbnailer: A Plugin for Pelican
=================================

[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/thumbnailer/main.yml?branch=main)](https://github.com/pelican-plugins/thumbnailer/actions)
[![PyPI Version](https://img.shields.io/pypi/v/pelican-thumbnailer)](https://pypi.org/project/pelican-thumbnailer/)

Thumbnailer is a Pelican plugin that creates thumbnails for all of the images found under a specific directory, in various thumbnail sizes.


Installation
-------------

This plugin can be installed via:

    python -m pip install pelican-thumbnailer

[Pillow](https://pillow.readthedocs.io/) will be automatically installed in order to resize the images, and the thumbnail will only be re-built if it doesn't already exist (to save processing time). Depending on your local environment and your image types, you may need to also install [external libraries](https://pillow.readthedocs.io/en/stable/installation.html#external-libraries) to add support for certain image file formats.

As long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `thumbnailer` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.


Configuration
-------------

* `IMAGE_PATH` is the path to the image directory. It should reside inside your content directory, and defaults to `pictures`.
* `THUMBNAIL_DIR` is the path to the output sub-directory where the thumbnails are generated.
* `THUMBNAIL_SIZES` is a dictionary mapping size name to size specifications.
  The generated filename will be `originalname_thumbnailname.ext` unless `THUMBNAIL_KEEP_NAME` is set.
* `THUMBNAIL_KEEP_NAME` is a Boolean that, if set, puts the file with the original name in a `thumbnailname` folder, named like the key in `THUMBNAIL_SIZES`.
* `THUMBNAIL_KEEP_TREE` is a Boolean that, if set, saves the image directory tree.
* `THUMBNAIL_INCLUDE_REGEX` is an optional string that is used as regular expression to restrict thumbnailing to matching files. By default all files not starting with a dot are respected.

Sizes can be specified using any of the following formats:

* `wxh` will resize to exactly `wxh` cropping as necessary to get that size
* `wx?` will resize so that the width is the specified size, and the height will scale to retain aspect ratio
* `?xh` same as `wx?` but will height being a set size
* `s` is a shorthand for `wxh` where `w=h`


Contributing
------------

Contributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].

To start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.

[existing issues]: https://github.com/pelican-plugins/thumbnailer/issues
[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pelican-thumbnailer",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<4.0,>=3.8.1",
    "maintainer_email": "",
    "keywords": "pelican plugin image thumbnail picture Pillow resize",
    "author": "",
    "author_email": "Justin Mayer <entroP@gmail.com>, Kevin Deldycke <kevin@deldycke.com>",
    "download_url": "https://files.pythonhosted.org/packages/2b/13/ed594b372779eae3f07a99be4450dda979fe4640f256ecbc0a7e2286f1d6/pelican_thumbnailer-1.0.2.tar.gz",
    "platform": null,
    "description": "Thumbnailer: A Plugin for Pelican\n=================================\n\n[![Build Status](https://img.shields.io/github/actions/workflow/status/pelican-plugins/thumbnailer/main.yml?branch=main)](https://github.com/pelican-plugins/thumbnailer/actions)\n[![PyPI Version](https://img.shields.io/pypi/v/pelican-thumbnailer)](https://pypi.org/project/pelican-thumbnailer/)\n\nThumbnailer is a Pelican plugin that creates thumbnails for all of the images found under a specific directory, in various thumbnail sizes.\n\n\nInstallation\n-------------\n\nThis plugin can be installed via:\n\n    python -m pip install pelican-thumbnailer\n\n[Pillow](https://pillow.readthedocs.io/) will be automatically installed in order to resize the images, and the thumbnail will only be re-built if it doesn't already exist (to save processing time). Depending on your local environment and your image types, you may need to also install [external libraries](https://pillow.readthedocs.io/en/stable/installation.html#external-libraries) to add support for certain image file formats.\n\nAs long as you have not explicitly added a `PLUGINS` setting to your Pelican settings file, then the newly-installed plugin should be automatically detected and enabled. Otherwise, you must add `thumbnailer` to your existing `PLUGINS` list. For more information, please see the [How to Use Plugins](https://docs.getpelican.com/en/latest/plugins.html#how-to-use-plugins) documentation.\n\n\nConfiguration\n-------------\n\n* `IMAGE_PATH` is the path to the image directory. It should reside inside your content directory, and defaults to `pictures`.\n* `THUMBNAIL_DIR` is the path to the output sub-directory where the thumbnails are generated.\n* `THUMBNAIL_SIZES` is a dictionary mapping size name to size specifications.\n  The generated filename will be `originalname_thumbnailname.ext` unless `THUMBNAIL_KEEP_NAME` is set.\n* `THUMBNAIL_KEEP_NAME` is a Boolean that, if set, puts the file with the original name in a `thumbnailname` folder, named like the key in `THUMBNAIL_SIZES`.\n* `THUMBNAIL_KEEP_TREE` is a Boolean that, if set, saves the image directory tree.\n* `THUMBNAIL_INCLUDE_REGEX` is an optional string that is used as regular expression to restrict thumbnailing to matching files. By default all files not starting with a dot are respected.\n\nSizes can be specified using any of the following formats:\n\n* `wxh` will resize to exactly `wxh` cropping as necessary to get that size\n* `wx?` will resize so that the width is the specified size, and the height will scale to retain aspect ratio\n* `?xh` same as `wx?` but will height being a set size\n* `s` is a shorthand for `wxh` where `w=h`\n\n\nContributing\n------------\n\nContributions are welcome and much appreciated. Every little bit helps. You can contribute by improving the documentation, adding missing features, and fixing bugs. You can also help out by reviewing and commenting on [existing issues][].\n\nTo start contributing to this plugin, review the [Contributing to Pelican][] documentation, beginning with the **Contributing Code** section.\n\n[existing issues]: https://github.com/pelican-plugins/thumbnailer/issues\n[Contributing to Pelican]: https://docs.getpelican.com/en/latest/contribute.html\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "Thumbnailer is a Pelican plugin creates smaller versions of images found in a directory",
    "version": "1.0.2",
    "project_urls": {
        "Funding": "https://donate.getpelican.com/",
        "Homepage": "https://github.com/pelican-plugins/thumbnailer",
        "Issue tracker": "https://github.com/pelican-plugins/thumbnailer/issues"
    },
    "split_keywords": [
        "pelican",
        "plugin",
        "image",
        "thumbnail",
        "picture",
        "pillow",
        "resize"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1482cdec41f11a0356d5814b4d0a2eed44b8b1e00dc4522c6aaffa54356e9820",
                "md5": "3406e26dc36c9bfc34aaa1edd2acb473",
                "sha256": "3c1a2519b143d8bfdae94052fab06c7ab6ee551743018cf4ef3d646eeb1d9315"
            },
            "downloads": -1,
            "filename": "pelican_thumbnailer-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3406e26dc36c9bfc34aaa1edd2acb473",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8.1",
            "size": 6174,
            "upload_time": "2024-01-23T15:52:36",
            "upload_time_iso_8601": "2024-01-23T15:52:36.780075Z",
            "url": "https://files.pythonhosted.org/packages/14/82/cdec41f11a0356d5814b4d0a2eed44b8b1e00dc4522c6aaffa54356e9820/pelican_thumbnailer-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2b13ed594b372779eae3f07a99be4450dda979fe4640f256ecbc0a7e2286f1d6",
                "md5": "916f46f6baa416fcb66a25ef1627db82",
                "sha256": "9beccc0a4b06973d358e7f093d21c5ef50abd71650eebf15cbb73686b52e1aa1"
            },
            "downloads": -1,
            "filename": "pelican_thumbnailer-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "916f46f6baa416fcb66a25ef1627db82",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8.1",
            "size": 5850,
            "upload_time": "2024-01-23T15:52:39",
            "upload_time_iso_8601": "2024-01-23T15:52:39.784760Z",
            "url": "https://files.pythonhosted.org/packages/2b/13/ed594b372779eae3f07a99be4450dda979fe4640f256ecbc0a7e2286f1d6/pelican_thumbnailer-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 15:52:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pelican-plugins",
    "github_project": "thumbnailer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pelican-thumbnailer"
}
        
Elapsed time: 0.17744s