2017-08-04 03:00:19 +00:00
|
|
|
# nicethings
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-16 04:14:40 +00:00
|
|
|
A program for shared Unix servers, specifically [tilde.town](https://tilde.town), to cheer people up .
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-15 18:19:47 +00:00
|
|
|
# Table of Contents
|
2020-01-20 19:17:21 +00:00
|
|
|
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
|
|
|
|
- [How it works](#how-it-works)
|
2020-06-15 18:09:05 +00:00
|
|
|
- [How it works in detail](#how-it-works-in-detail)
|
|
|
|
- [Installation](#installation)
|
2020-01-20 19:17:21 +00:00
|
|
|
- [Usage](#usage)
|
|
|
|
<!-- markdown-toc end -->
|
2018-11-12 03:01:21 +00:00
|
|
|
|
2018-11-12 02:50:10 +00:00
|
|
|
# How it works
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-16 04:14:40 +00:00
|
|
|
Each user on the shared Unix server may have a `.nicethings` file. The
|
|
|
|
`.nicethings` file may be populated with a list of nice messages
|
|
|
|
created by a user. All users' `.nicethings` files are converted to
|
|
|
|
lists. All lists are combined into one list. A random nice message is
|
|
|
|
picked from from this list and is displayed to the user.
|
2017-08-04 03:00:19 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
## How it works in detail
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
* Each user has a `~/.nicethings` directory.
|
|
|
|
* Users can add messages to this file using the `nicethings add "your nice message here"` interface.
|
|
|
|
* Each message is stored in the file as separate lines. No file format is used.
|
|
|
|
* Users can display a numbered list of the messages they have stored using the `nicethings ls` interface.
|
|
|
|
* Users can remove their own messages using the `nicethings rm 2` interface, where the number refers to an item in their list.
|
|
|
|
* Users can view a random message from a random user using the `nicethings` interface (with no arguments).
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
# Installation
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
1. Run `git clone https://github.com/m455/nicethings`
|
|
|
|
2. Run `cd nicethings`
|
2020-07-07 15:26:23 +00:00
|
|
|
3. Run `make` for further installation instructions.
|
2018-08-07 18:12:28 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
# Usage
|
2020-01-20 19:17:21 +00:00
|
|
|
|
2020-06-15 18:09:05 +00:00
|
|
|
```
|
2020-06-16 03:55:50 +00:00
|
|
|
nicethings [<command>] [<args>]
|
2020-06-15 18:09:05 +00:00
|
|
|
|
|
|
|
Commands:
|
|
|
|
No command - Print a random nice thing.
|
|
|
|
add - Add a message to the list of nice things.
|
|
|
|
ls - Print a numbered list of the nice things you have added.
|
|
|
|
rm - Remove a message you have added from the list of nice things.
|
|
|
|
|
|
|
|
Examples:
|
2020-06-16 03:55:50 +00:00
|
|
|
nicethings
|
|
|
|
nicethings add \"You are beautiful\"
|
|
|
|
nicethings ls
|
|
|
|
nicethings rm 2
|
2020-06-15 18:09:05 +00:00
|
|
|
```
|