README.md 2.02 KB
Newer Older
Luc Didry's avatar
Luc Didry committed
1
2
3
4
# vRMS

This program creates an HTML statistics page from [`vrms`](https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=names&keywords=vrms) mails.

Luc Didry's avatar
Luc Didry committed
5
This programm connects to an IMAP account, checks the new mails, parses them and creates an HTML output in `public` folder.
Luc Didry's avatar
Luc Didry committed
6

Luc Didry's avatar
Luc Didry committed
7
8
9
10
11
12
13
14
15
## How to get `vrms` mails?

Install `vrms` on your computer, then simply create a cron task for:
```
vrms | mail -s "subject" address@example.org
```

Then use the credentials for that email address with this software.

Luc Didry's avatar
Luc Didry committed
16
17
18
19
20
21
22
23
24
25
26
27
28
## How to use it on your computer?

### Installation

Install Perl6 and some modules:

```
apt-get install -y git build-essential libssl-dev
git clone https://github.com/tadzik/rakudobrew ~/.rakudobrew
echo 'PATH=~/.rakudobrew/bin:$PATH' > ~/.bashrc
. ~/.bashrc
rakudobrew build moar
rakudobrew build zef
29
zef install --/test Template::Mojo File::Directory::Tree Terminal::Spinners JSON::Fast
Luc Didry's avatar
Luc Didry committed
30
31
32
zef install --/test --deps-only Net::IMAP
```

Luc Didry's avatar
Luc Didry committed
33
34
35
36
37
38
39
Install yarn:
```
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
```

Luc Didry's avatar
Luc Didry committed
40
41
42
43
Install vRMS:

```
git clone https://framagit.org/framasoft/vrms
Pierre Rudloff's avatar
Pierre Rudloff committed
44
cd vrms/themes/default/front
Luc Didry's avatar
Luc Didry committed
45
46
yarn install
cd -
Luc Didry's avatar
Luc Didry committed
47
48
49
50
```

### Configuration

Luc Didry's avatar
Luc Didry committed
51
The configuration is provided by environment variables:
Luc Didry's avatar
Luc Didry committed
52

Luc Didry's avatar
Luc Didry committed
53
- `USER`: the user for the IMAP connection (mandatory)
Luc Didry's avatar
Luc Didry committed
54
55
56
- `PASSWORD`: his password (mandatory)
- `SERVER`: the IMAP server address (mandatory)
- `THEME`: the theme you want to use (optional, default is `default`)
57
- `HIDENAMES`: set to 1 if you want to hide the names of your server (optional, no default)
Luc Didry's avatar
Luc Didry committed
58
59
60
61
62
63
64
65
66
67
- `DEV`: set to 1 if you want to fetch all mails, not only the unread ones (optional, no default)

### Use

```
USER=foo@bar.org PASSWORD=s3cr3t SERVER=imap.bar.org ./vrms-web.pl6
```

## How to use it with Gitlab CI and Gitlab Pages?

Luc Didry's avatar
Luc Didry committed
68
Fork https://framagit.org/framasoft/vrms. Set the environment variables in the project configuration. Run a pipeline. That's all.