Thumbnailer is a Pelican plugin creates smaller versions of images found in a directory
Project description
Thumbnailer: A Plugin for Pelican
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 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 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 documentation.
Configuration
IMAGE_PATHis the path to the image directory. It should reside inside your content directory, and defaults topictures.THUMBNAIL_DIRis the path to the output sub-directory where the thumbnails are generated.THUMBNAIL_SIZESis a dictionary mapping size name to size specifications. The generated filename will beoriginalname_thumbnailname.extunlessTHUMBNAIL_KEEP_NAMEis set.THUMBNAIL_KEEP_NAMEis a Boolean that, if set, puts the file with the original name in athumbnailnamefolder, named like the key inTHUMBNAIL_SIZES.THUMBNAIL_KEEP_TREEis a Boolean that, if set, saves the image directory tree.THUMBNAIL_INCLUDE_REGEXis 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:
wxhwill resize to exactlywxhcropping as necessary to get that sizewx?will resize so that the width is the specified size, and the height will scale to retain aspect ratio?xhsame aswx?but will height being a set sizesis a shorthand forwxhwherew=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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pelican_thumbnailer-1.0.2.tar.gz.
File metadata
- Download URL: pelican_thumbnailer-1.0.2.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9beccc0a4b06973d358e7f093d21c5ef50abd71650eebf15cbb73686b52e1aa1
|
|
| MD5 |
916f46f6baa416fcb66a25ef1627db82
|
|
| BLAKE2b-256 |
2b13ed594b372779eae3f07a99be4450dda979fe4640f256ecbc0a7e2286f1d6
|
File details
Details for the file pelican_thumbnailer-1.0.2-py3-none-any.whl.
File metadata
- Download URL: pelican_thumbnailer-1.0.2-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c1a2519b143d8bfdae94052fab06c7ab6ee551743018cf4ef3d646eeb1d9315
|
|
| MD5 |
3406e26dc36c9bfc34aaa1edd2acb473
|
|
| BLAKE2b-256 |
1482cdec41f11a0356d5814b4d0a2eed44b8b1e00dc4522c6aaffa54356e9820
|