# uiconsult

> glo2 project in utt

Latest version **1.0.2** (published 2018-12-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install uiconsult
pnpm add uiconsult
yarn add uiconsult
bun add uiconsult
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2018-12-30 |
| First published | 2018-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 236.7 KB |
| Known vulnerabilities | 0 (+8 in 1 direct dependencies) |
| Install scripts | no |
| Author | Cheng JIANG |
| Maintainers | gopherj |

## Links

- npm: https://www.npmjs.com/package/uiconsult
- npm.io page: https://npm.io/package/uiconsult

## Dependencies (11)

- [ora](https://npm.io/package/ora.md) ^3.0.0
- [vega](https://npm.io/package/vega.md) ^4.3.0
- [walk](https://npm.io/package/walk.md) ^2.3.14
- [chalk](https://npm.io/package/chalk.md) ^2.4.1
- [dayjs](https://npm.io/package/dayjs.md) ^1.7.7
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [caporal](https://npm.io/package/caporal.md) ^0.10.0
- [vega-lite](https://npm.io/package/vega-lite.md) ^3.0.0-rc8
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.5.1
- [vega-embed](https://npm.io/package/vega-embed.md) ^3.23.1
- [object-path](https://npm.io/package/object-path.md) ^0.11.4

## Recent versions

- 1.0.2 (latest) — 2018-12-30
- 1.0.1 — 2018-12-12
- 1.0.0 — 2018-12-12

## README

## UIConsult

GL02 project@1.0


### Recommanded IDEs

- `vscode`
- `webstorm`


### Development

- `install npm or yarn (yarn is better), nvm`
- `nvm use`
- `clone this project`
- `svn checkout --username=USERNAME svn+ssh://USERNAME@svn.code.sf.net/p/sky-gl02/code/ sky-gl02-code`
- `yarn OR npm install`
- `develop and commit`


### Dependencies

Learn these cool packages so that you can use it in this project

- `caporal`
- `cli-table3`
- `vega, vega-lite, vega-embed`
- `walkdir`
- `chalk`
- `dayjs`
- `mkdirp`
- `object-path`
- `ora`

And you need also to learn `mocha` and `chai` so that you can write unit test! We won't use `nodeunit` cause it's no more maintained.


### Caveats

1. To export en PNG, you need to have `node-gyp` installed which requires `python2.7`, `g++ OR VScode build tool`...

2. You need to write unit test for most functions you've added

3. Install `editorconfig` plugin for your IDE to make sure that we have a common basic code format

4. `vega` requires some system dependencies like `libcairo2-dev` `libjpeg-dev` `libgif-dev` on ubuntu, you need to install them by yourself. On ubuntu, you can install them bu running:
    ```bash
    sudo apt install libcairo2-dev libjpeg-dev libgif-dev
    ```


### Build && Compile && Test

`compile to generate an executable`
```bash
npm run build
# it will generate executables for linux, win and  macos. See the executable in ./bin
```

`unit test`
```bash
npm run test
# now there is no test
```


## Usage

1. Load emails of specific period
```bash
src/index.js lms \
    /path/to/data \ 
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

2. Show exchanged emails of an employee 
```bash
src/index.js nms \
    /path/to/data \
    <employee's name  | employee's email address> \ 
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

3. Show busy days of an employee
```bash
src/index.js bsd \
    /path/to/data <employee's name | employee's email address> \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

4. Show the top 10 contacts of an employee
```bash
src/index.js tpc \
    /path/to/data \
    <employee's name | employee's email address> \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

5. Show the top 10 words used by an employee in his email subject
```bash
src/index.js tpw \ 
    /path/to/data <employee's name | employee's email address> \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

6. Visualize sent and received emails of an employee 
```bash
src/index.js emp \
    /path/to/data <employee's name | employee's email address> \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

7. Visualize sent emails of all collaborators
```bash
src/index.js nbmc \
    /path/to/data \
    --file="/path/to/save/svg/or/png" \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

8. Visualize employee's frequency of sending emails
```bash
src/index.js fmu \
    /path/to/data \
    --file="/path/to/save/svg/or/png" \
    --employee="<employee's name|employee's email address>" \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy"
```

9. Search emails by name of employee or email's content and subject
```bash
src/index.js sbc \
    /path/to/data \
    --employee="<employee's name|employee's email address>" \
    --date-from="[dd/][mm/]yyyy" \
    --date-to="[dd/][mm/]yyyy" \
    --subject="text" \
    --content="text"
```


### Build && Compile && Test

`compile`
```bash
npm run build

# it will generate executables for linux, win and  macos. See the executable in ./bin
```

`cross-system compile`
```bash
TARGET_OS=win npm run build
TARGET_OS=linux npm run build
TARGET_OS=osx npm run build
```

`unit test`
```bash
npm run test
```

---
_Source: https://npm.io/package/uiconsult · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
