Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/homeworkprod/smfnotify
Notify webhook of new posts in Simple Machines Forum instance
https://github.com/homeworkprod/smfnotify
simple-machines-forum webhook webhooks
Last synced: about 6 hours ago
JSON representation
Notify webhook of new posts in Simple Machines Forum instance
- Host: GitHub
- URL: https://github.com/homeworkprod/smfnotify
- Owner: homeworkprod
- License: mit
- Created: 2022-05-08T15:24:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-03T00:08:16.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T12:13:17.909Z (7 days ago)
- Topics: simple-machines-forum, webhook, webhooks
- Language: Rust
- Homepage: https://homework.nwsnet.de/releases/56c7/#smfnotify
- Size: 98.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# SMFNotify
Announce new threads and posts in a [Simple Machines
Forum](http://simplemachines.org/) instance by sending HTTP requests to
a configurable webhook endpoint.## Usage
SMFNotify is intended to be invoked regularly, for example every few
minutes (depending on the activity of the monitored forum and how
quickly people want to be informed about new posts).Each invocation fetches the feed, looks for new entries, and calls the
webhook for each one before exiting.A configuration file is mandatory to run it:
```sh
$ smfnotify --config config_example.toml
```An example configuration file is included as ``config_example.toml`` and
looks like this:```toml
feed_url = "https://forum.example.com/index.php?action=.xml;type=atom"
feed_cookie_value = ""
feed_max_new_entries = 5last_processed_id_filename = "last_processed_id"
webhook_text_template = "{author} posted to forum: \"{title}\" - <{url}>"
webhook_url = "http://127.0.0.1:8080/"interval_in_seconds = 120
```To obtain the cookie value, log in to the forum, then use your web
browser's debugger or an extension to look up the cookie named
``SMFCookie10``.The interval is optional. If it is not set, SMFNotify will only fetch
and potentially notify about new entries just once, then exit.## Docker
Both a ``Dockerfile`` and a ``compose.yaml`` are included to support
running SMFNotify with Docker and Docker Compose.Be sure to provide:
- a configuration file named ``config.toml`` (and configure an interval)
and
- a ``last_processed_id`` file (can be empty; create with ``touch
last_processed_id``)to avoid issues.
## Background
SMFNotify is a port of a Python script I wrote in October 2015.
## License
SMFNotify is licensed under the MIT license.
## Copyright
Copyright 2022-2023 Jochen Kupperschmidt