README.md 1.38 KB
Newer Older
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
# Statistics

A project designed to generate statistics about my email and commit and pipelines history at NSD.

## How to use

This project was put together quickly and should generally be used by firing up a Clojure REPL and evaluating code.
The `src/statistics/core.clj` namespace contains the primary code to generate statistics.

### Email files

To generate statistics about emails you should probably download a copy of your mail from University of Bergen's email server.
The simplest way to do this is to log into `alf.uib.no` using your Sebra account and copying all the mailbox files into your home directory.
You want to copy the following files:

- `ls ~/mail`
- `echo $MAIL`

Then simply make a compressed tar archive of the files and use scp to copy them to your local development machine.
The email library used in the code only reads the first email in a mailbox file so we need to split them into one mail per mailbox file.
This can be achieved using the `mb2md` command which converts Mbox mailboxes to Maildir format.

### GitLab API

To generate statistics over GitLab commits and pipelines you need to access the API.
For this you need to generate a [GitLab API token](https://gitlab.nsd.no/profile/personal_access_tokens) with the `api` scope.
This token can then be inserted into `./resources/gitlab-token` under this project folder and be slurped by the code.

License

Do whatever you want!