summary refs log tree commit diff stats
path: root/README.md
blob: a2060c0dd4dd414630f636b613d650666f1ada2d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh {
# clinte   [![Build Status](https://travis-ci.com/gbmor/clinte.svg?branch=master)](https://travis-ci.com/gbmor/clinte) [![codecov](https://codecov.io/gh/gbmor/clinte/branch/master/graph/badge.svg)](https://codecov.io/gh/gbmor/clinte)

Command-line community notice board. Post text-only notes for other users to see.

## Features

- Username is tagged based on the executing user
- Shows the 15 most recent posts in descending order
- Able to go back and edit your own posts
- Title <= 30 chars
- Body <= 500 chars
- Calls `$EDITOR` when creating or modifying the body of a post
- If `$EDITOR` is unset, calls `nano`

[![Screenshot](https://github.com/gbmor/clinte/blob/master/assets/clinte.png)](https://github.com/gbmor/clinte/blob/master/assets/clinte.png)

## Installation

Current build dependencies are as follows:

- `rust >= 1.36`
- `libsqlite3-dev`

The installation for the build deps will vary based on your OS (`Linux, BSD`)

Clone the repository and jump into the directory:

```
$ git clone git://github.com/gbmor/clinte.git
...
$ cd clinte
$ git checkout $(git describe --tags --abbrev=0)
```

Run the makefile and install:

```
$ make
...
...Done!

$ sudo make install
```

## Usage

Issuing the program name itself will list
the currently available posts, like in the screenshot above.

**Display recent posts**

```
$ clinte
```

**Create a post**

```
$ clinte post
```

`clinte` will then ask for the title of the post, and the body. The username will be
tagged automatically by your logged-in username, reflecting its intended use on
multi-user UNIX-like systems.

**Edit a post**

```
$ clinte update [id]
```

If the `[id]` argument is absent, `clinte` will ask for the ID number of the post.
If it's been authored by you, then you will be asked for the new title.
Your `$EDITOR` will be called, and will be populated with the previous body.

**Delete a post**

```
$ clinte delete [id]
```

If the `[id]` argument is absent,  `clinte` asks for the numeric ID of the post to delete.

**Verbose logging**

```
$ clinte -v [post|update|delete] [id]
```
Use this flag if something's going wrong. Additional information will be written to
`/tmp/clinte_$USER.log` that will, hopefully, reveal the cause of the error.
pan class="o">** state); void cmd_connect_with_port_when_provided(void** state); void cmd_connect_with_server_and_port_when_provided(void** state); void cmd_connect_shows_usage_when_server_provided_twice(void** state); void cmd_connect_shows_usage_when_port_provided_twice(void** state); void cmd_connect_shows_usage_when_invalid_first_property(void** state); void cmd_connect_shows_usage_when_invalid_second_property(void** state);