stacosys/README.md

61 lines
2.7 KiB
Markdown
Raw Normal View History

2022-12-03 19:15:22 +01:00
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
2024-12-09 14:17:42 +01:00
[![Python version](https://img.shields.io/badge/Python-3.13-blue.svg)](https://www.python.org/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Flask version](https://img.shields.io/badge/Flask-3.1-green.svg)](https://flask.palletsprojects.com)
2021-08-15 14:08:36 +02:00
2025-04-05 17:55:40 +02:00
[![Build Status - pytest](https://gitea.zaclys.com/yannic/stacosys/raw/branch/main/tests-badge.svg)]() [![Coverage Status](https://gitea.zaclys.com/yannic/stacosys/raw/branch/main/coverage-badge.svg)]()
2021-08-15 14:24:52 +02:00
2015-10-25 14:40:24 +01:00
## Stacosys
2025-04-05 17:57:05 +02:00
Stacosys (aka STAtic blog COmment SYStem) is a fork of Pecosys trying to fix design drawbacks and provide a basic alternative to comment hosting services like Disqus. Stacosys works with any static blog or even a simple HTML page.
2015-10-25 14:40:24 +01:00
### Features overview
Stacosys main feature is comment management.
Here is the workflow:
- Readers submit comments via a comment form embedded in blog pages
2022-02-19 11:44:11 +01:00
- Blog administrator receives an e-mail notification from Stacosys when a
2015-10-25 14:40:24 +01:00
comment is submitted
2022-02-19 11:44:11 +01:00
- Blog administrator can approve or drop the comment through a simple web admin interface
2015-10-25 14:40:24 +01:00
- Stacosys stores approved comment in its database.
2022-02-19 11:44:11 +01:00
Privacy concerns: only surname, gravatar id and comment itself are stored in DB. E-mail is optionally requested in submission form to resolve gravatar id but never sent to Stacosys.
2022-02-19 11:44:11 +01:00
Stacosys is more or less localized (english and french).
2015-10-25 14:40:24 +01:00
### Technically speaking, how does it work?
2022-02-19 11:44:11 +01:00
Stacosys offers a REST API to retrieve and post comments. Static blog is HTML-based and a piece of JavaScript code interacts with Stacosys using HTTP requests. Each page has a unique id and a request allows retrieving comments for a given page. Similarly, a form request allows to post a comment which is relayed to the administrator by e-mail. For this purpose an SMTP configuration is needed.
2021-01-31 17:06:48 +01:00
### Little FAQ
2015-10-25 14:40:24 +01:00
*How do you block spammers?*
2022-02-19 11:44:11 +01:00
- Current comment form is basic: no captcha support but protected by a honeypot.
2015-10-25 14:40:24 +01:00
*Which database is used?*
- SQLite.
2015-10-25 14:40:24 +01:00
*Which technologies are used?*
2021-08-15 14:08:36 +02:00
- [Python](https://www.python.org)
2015-10-25 14:40:24 +01:00
- [Flask](http://flask.pocoo.org)
- [Markdown](http://daringfireball.net/projects/markdown)
2018-09-15 13:38:03 +02:00
### Installation
Build and Dependency management relies on [uv](https://docs.astral.sh/uv/)
2018-09-15 13:38:03 +02:00
Run tests and coverage
2023-03-28 19:41:44 +02:00
make test
2023-12-17 17:35:32 +01:00
Build docker image
2023-12-17 17:35:32 +01:00
make build
2023-03-28 19:41:44 +02:00
### Improvements
2015-10-25 14:52:27 +01:00
2025-03-23 17:51:19 +01:00
Stacosys fits my needs, and it manages comments on [my blog](https://blogduyax.madyanne.fr) for a while. I don't have any plan to make big changes, it's more a python playground for me. So I strongly encourage you to fork and enhance the project if you need additional features.