diff options
| author | Dennis Fink | 2026-11-06 08:04:54 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-06 08:04:54 +0100 |
| commit | 3ccac9a70669db5cd9d83a1d05b02e0c43cf58c6 (patch) | |
| tree | 52cd7823f44119bd455e45e1d82abe16183da5cb /packages/reading-time/setup.py | |
| parent | 550252e137dedf8b4d54c961f10850c74c0bc9bf (diff) | |
| download | dennisfink.me-3ccac9a70669db5cd9d83a1d05b02e0c43cf58c6.tar.gz dennisfink.me-3ccac9a70669db5cd9d83a1d05b02e0c43cf58c6.zip | |
Add reading time estimates to blog posts
This adds a project-local Lektor plugin that estimates reading time from
article text and images, using NLTK for word tokenization and decreasing
time weights for successive images.
The plugin exposes a `reading_time` template function and displays the
estimated reading time alongside other blog post metadata.
Diffstat (limited to 'packages/reading-time/setup.py')
| -rw-r--r-- | packages/reading-time/setup.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/packages/reading-time/setup.py b/packages/reading-time/setup.py new file mode 100644 index 0000000..b61d5cf --- /dev/null +++ b/packages/reading-time/setup.py @@ -0,0 +1,13 @@ +from setuptools import setup + +setup( + name="lektor-reading-time", + version="0.1.0", + py_modules=["lektor_reading_time"], + entry_points={ + "lektor.plugins": [ + "reading-time = lektor_reading_time:ReadingTimePlugin", + ] + }, + install_requires=["nltk>=3.8"], +) |
