E-mail based guestbook. Static page generator with emails as input. https://scuti.neocities.org/pages/guestbook

scuti eda221a8d9 merged branch publish před 2 měsíci
example eda221a8d9 merged branch publish před 2 měsíci
filters eda221a8d9 merged branch publish před 2 měsíci
src eda221a8d9 merged branch publish před 2 měsíci
README.md eda221a8d9 merged branch publish před 2 měsíci
requirements.txt eda221a8d9 merged branch publish před 2 měsíci

README.md

emlgb

Statically generates a guestbook based on e-mails.

Helpful if:

  • you don't want to sign up for guestbook providers
  • want to store your guests' messages on your own computer instead of a service
  • don't or can't use javascript on your page.

What it does:

  • generate a page based on files in a folder

What it doesn't do:

  • signs in to your e-mail server or service provider to download e-mails
  • stewards, copies, edits, or manages your e-mails as files.

(This script assumes you downloaded your emails either manually or through an email client.)

requirements

This script uses Python 3 and was tested with Python 3.12.5.

Autogenerated by pipreqs.

beautifulsoup4 python_dateutil  toml

usage

python src/guestbook.py -c yourconfig.toml > guestbook.html

The default config file assumes there is

  • a folder of emails named inbox in the current working directory
  • the page template mwe.html has been copied

diff/filters

Filters turn e-mail notifications from services into guestbook comments. Example: you want to include notifications sent by neocities in your guestbook.

When reading a filter, the script scans for keywords:

  • {__username__}, the user on the service who wrote the comment
  • {__message__}, the comment written by the user
  • {__link__}, the link to the comment included by the e-mail notification
  • {keep}, words from the e-mail notification to keep in the guestbook comment

Every other word that the email message and the filter have in common is omitted from the guestbook.

example (neocities)

In this example, {__username__} is highlighted so the guestbook links back to the commenter's profile on neocities. The {__link__} is used to create an anchor tag on the timestamp.

misc

This was developed with my own use in mind. I currently don't receive enough guestbook comments to need to write a pagination function.