RhinoReminds/README.md

94 lines
3.6 KiB
Markdown
Raw Normal View History

2018-11-10 18:47:03 +00:00
# RhinoReminds
2018-11-11 11:18:37 +00:00
> An XMPP reminder bot written in C#.
I've blogged about this project here: [RhinoReminds: An XMPP reminder bot for my convenience](https://starbeamrainbowlabs.com/blog/article.php?article=posts/328-RhinoReminds.html)
2018-12-06 00:21:43 +00:00
2018-11-11 12:13:43 +00:00
## Getting Started
2018-12-06 00:14:36 +00:00
### Downloading Prebuilt Binaries
Prebuilt binaries for the latest release are available on the [releases page](https://git.starbeamrainbowlabs.com/sbrl/RhinoReminds/releases).
### Building from Source
2018-11-11 12:13:43 +00:00
1. Install the NuGet dependencies:
```bash
nuget restore
```
2. Build the solution:
```bash
msbuild
```
3. Specify the environment variables
Variable | Meaning
----------------|------------------------
`XMPP_JID` | The JID to connect with
`XMPP_PASSWORD` | The password to use when connecting
4. Execute the program
```bash
cd RhinoReminds/bin/{Debug|Release}
# Linux:
mono [--debug] RhinoReminds.exe [--help]
# Windows:
RhinoReminds.exe [--help]
```
### Setting up RhinoReminds as a system service
Some helpful template files are located in this repository to aid in setting _RhinoReminds_ up as a system service.
- [`start_service.sh`](https://git.starbeamrainbowlabs.com/sbrl/RhinoReminds/src/branch/master/start_service.sh) Contains a script that reads in CLI variables from a file, sets up a PID file directory with the appropriate permissions, and then executes _RhinoReminds_ as an unprivileged user.
- [`rhinoreminds.service`](https://git.starbeamrainbowlabs.com/sbrl/RhinoReminds/src/branch/master/rhinoreminds.service) Contains a systemd service file compatible with `start_service.sh`
- [`rhinoreminds-rsyslog.conf`](https://git.starbeamrainbowlabs.com/sbrl/RhinoReminds/src/branch/master/rhinoreminds-rsyslog.conf) Contains an Rsyslog definition file compatible with the systemd service file defined above. When put in `/etc/rsyslog.d` (don't forget to restart the `rsyslog` service!), it will write and auto-rotate log files of the standard output and standard error of the main _RhinoReminds_ process to a subfolder fo `/var/log` automatically.
2018-12-06 00:21:43 +00:00
2018-11-11 12:13:43 +00:00
## Usage
The bot operates on natural language instructions. It picks what to do from the first word in the sentence, but the rest is parsed via AI.
### Setting a reminder
```
Remind me to feed the cat at 6pm
Remind me about CrossCode's release on 20th September 2018
2018-11-11 12:49:36 +00:00
Remind me to water the greenhouse tomorrow at 4:03pm
2018-11-11 12:13:43 +00:00
Remind me in 1 hour to check the oven
```
### Listing reminders
```
List all reminders
Show all
List all
```
2018-12-05 23:44:20 +00:00
### Deleting Reminders
```
Delete reminder 43
Delete #22, #23, and #45
Delete number eight
Delete reminders 2, 3, 4, and 7
```
2018-11-11 11:18:37 +00:00
2018-12-06 00:21:43 +00:00
2018-12-06 00:20:58 +00:00
## Contributing
Contributions are welcome! Bug reports can be opened against this repository if you have an account. Otherwise, send them to `bugs at starbeamrainbowlabs dot com`.
Pull requests and patches are welcome too. [Here's a great tutorial](https://makandracards.com/makandra/2521-git-how-to-create-and-apply-patches) on creating patches. If there's any interest, I'll move this repository to my account on [gitlab.com](https://gitlab.com/sbrl) if that makes things easier.
## License
RhinoReminds is licensed under the _Mozilla Public License 2.0_ (MPL-2.0 for short) - the full text of which can be found in the [LICENSE](https://git.starbeamrainbowlabs.com/sbrl/RhinoReminds/src/branch/master/LICENSE) file in this repository. tl;drLegal have a [great summary](https://tldrlegal.com/license/mozilla-public-license-2.0-(mpl-2)) if you don't want to spend all day read dry legalese :P
2018-11-11 11:18:37 +00:00
## Useful Links
- [Microsoft.Text.Recognizers Samples](https://github.com/Microsoft/Recognizers-Text/tree/master/.NET/Samples)
- [S22.Xmpp API Documentation](https://smiley22.github.io/S22.Xmpp/Documentation/)
-