Menu

Home

Maxence Barbançon Nao Nicolas Matthieu Soliman Ronan Gasselin

Project wiki

Welcome to the wiki !

This wiki is structured along the following points :

  • User guide
  • Developer guide

User guide

Pre-requirements

First of all you need to open a command prompt and change directory into our project directory wherever it is :
cd {path}\andromeda-gl02-code

Then you need to install all node modules and packages :
npm install

After that, you're ready to use whatever command you want with this syntax :
node caporalCli.js <command> <path> [-options]

Available commands are :
<command> : check, search, contact, mails-number, buzzy, top-interlocutors, top-subject, dots-cloud
you can type --help or -h to display the program help at any moment

Command check

check <file> [-options]

check checks if a <file> is a valid mail file
[-options] can be replaced by -t (--showTokenize) or -s (--showSymbols)

search <dir> <needle>

search searches among mails those who contains a word
<dir> is the directory to search
<needle> is the word we search

Command contact

contact <dir> <needle>

contact creates a VCard (user card) for the contacts of a specified user
<dir> is the directory to search
<needle> is the person whose contacts we're looking for

Command mails-number

mails-number <dir> <collaborator> [-options]

mails-number counts exchanged e-mails with one person during a period
<dir> is the directory to search
<collaborator> the collaborator's email address whose e-mails should be analyzed
[-options] can be replaced by --period <period> where <period> is the period of exchange in format yyyy-mm-dd/yyyy-mm-dd

Command buzzy

buzzy <dir> <collaborator> [-options]

buzzy gives the list of emails sent during buzzy days
<dir> is the directory to search
<collaborator> the collaborator's email address whose e-mails should be analyzed
[-options] can be replaced by --period <period> where <period> is the period of exchange in format yyyy-mm-dd/yyyy-mm-dd

Command top-interlocutors

top-interlocutors <dir> <collaborator> [-options]

top-interlocutors searches for the top 10 interlocutors of a collaborator during a period
<dir> is the directory to search
<collaborator> the collaborator's email address whose e-mails should be analyzed
[-options] can be replaced by --period <period> where <period> is the period of exchange in format yyyy-mm-dd/yyyy-mm-dd

Command top-subject

top-subject <dir> <collaborator> [-options]

top-subject searches for the top 10 subject words of a collaborator during a period
<dir> is the directory to search
<collaborator> the collaborator's email address whose e-mails should be analyzed
[-options] can be replaced by --period <period> where <period> is the period of exchange in format yyyy-mm-dd/yyyy-mm-dd

Command dots-cloud

dots-cloud <dir> [-options]

dots-cloud produces a dots cloud of contacts for a mailbox
<dir> is the directory to search
[-options] can be replaced by --period <period> where <period> is the period of exchange in format yyyy-mm-dd/yyyy-mm-dd

README.txt

You can also check the README.txt file : README.txt


Developer guide

Introduction

Dependence

This project has been realized with the framework Caporal
Tests have been realized with Jasmine
The data visualization is generated with Vega-lite

Code structure

We can categorize the files/folders of the program in different parts :

  • Data : data , dataTest
  • Documentation : README.txt
  • Function : MailsNumber.js, Buzzy.js, Contact.js, DotsCloud.js, Search.js, TopInterlocutors.js, TopSubject.js
  • Parser : MailParser.js, dateSystem.js
  • Tests : spec
  • Data format : mail.js
  • Main : caporalCli.js

When the program runs

First of all it launches the file caporalCli.js, according to the chosen function, the function files will launch.
This file requires some modules such as mail.js, MailParser.js, dateSystem.js, etc . So these are being called.
Once it recovers the modules, the contents of the file are executed.

Improvement

We have left some tickets that requires fixes in the code.

To go further some functions can be added such as :

  1. Return a VCard (user card) of the employee who sent most mails in a certain period of time.
  2. Return a VCard (user card) of the employee who receive most mails in a certain period of time.

If you are very motivated, you can upgrade the project by creating a visual interface.


The wiki uses Markdown syntax.

Project Members: