1.0.2 • Published 5 years ago
uiconsult v1.0.2
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
To export en PNG, you need to have
node-gyp
installed which requirespython2.7
,g++ OR VScode build tool
...You need to write unit test for most functions you've added
Install
editorconfig
plugin for your IDE to make sure that we have a common basic code formatvega
requires some system dependencies likelibcairo2-dev
libjpeg-dev
libgif-dev
on ubuntu, you need to install them by yourself. On ubuntu, you can install them bu running:sudo apt install libcairo2-dev libjpeg-dev libgif-dev
Build && Compile && Test
compile to generate an executable
npm run build
# it will generate executables for linux, win and macos. See the executable in ./bin
unit test
npm run test
# now there is no test
Usage
- Load emails of specific period
src/index.js lms \
/path/to/data \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Show exchanged emails of an employee
src/index.js nms \
/path/to/data \
<employee's name | employee's email address> \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Show busy days of an employee
src/index.js bsd \
/path/to/data <employee's name | employee's email address> \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Show the top 10 contacts of an employee
src/index.js tpc \
/path/to/data \
<employee's name | employee's email address> \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Show the top 10 words used by an employee in his email subject
src/index.js tpw \
/path/to/data <employee's name | employee's email address> \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Visualize sent and received emails of an employee
src/index.js emp \
/path/to/data <employee's name | employee's email address> \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Visualize sent emails of all collaborators
src/index.js nbmc \
/path/to/data \
--file="/path/to/save/svg/or/png" \
--date-from="[dd/][mm/]yyyy" \
--date-to="[dd/][mm/]yyyy"
- Visualize employee's frequency of sending emails
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"
- Search emails by name of employee or email's content and subject
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
npm run build
# it will generate executables for linux, win and macos. See the executable in ./bin
cross-system compile
TARGET_OS=win npm run build
TARGET_OS=linux npm run build
TARGET_OS=osx npm run build
unit test
npm run test