Event Reporter

Allows for loading, inspection, filtering, printing and saving of csv containing event attendees through CLI. Read the project description on JumpstartLab's website.

Installation

$ gem install event_reporter

Usage

For help:

> help
find <attribute> <criteria>     searches csv for specific criteria
load <filename>                 erase any loaded data and parse the specified file. If no filename is given default to event_attendees.csv
queue count                     outputs how many records are in the current queue
queue clear                     empty the queue
queue print                     print out a tab-delimited data table with a header row
queue print by <attribute>      print the data table sorted by the specified attribute like zipcode
queue save to <filename.csv>    exports current queue to specified filename as a CSV
add <attribute> <criteria>      exports current queue to specified filename as a CSV
subtract <attribute> <criteria> exports current queue to specified filename as a CSV
quit                            exits program

Example:

EventManager initializing...
> load event_attendees.csv
Loaded event_attendees.csv (5175 attendees)
> find first_name (john, sarah) and state (co, ky)
There are 6 records in your queue
> queue print by last_name
LAST NAME FIRST NAME EMAIL                             ZIPCODE CITY          STATE ADDRESS              PHONE NUMBER 
Catlin    Sarah      [email protected] 40206   Louisville    KY    114 N Galt Ave       5029386000   
Dayananda John       [email protected]     40206   Louisville    KY    513 Emery Rd.        5027410000   
Dyment    John       [email protected]         40741   London        KY    216 Johnson Addition 6068624000   
Riordan   Sarah      [email protected]       80212   Denver        CO    2814 Tennyson St.    7202058000   
Ruud      Sarah      [email protected] 40508   Lexington     KY    300 N. Broadway      6067480000   
Waickman  Sarah      [email protected]        42101   Bowling green KY    1538 Chestnut Street 6153306000   
> subtract city denver
There are 5 records in your queue
> queue print by city     
LAST NAME FIRST NAME EMAIL                             ZIPCODE CITY          STATE ADDRESS              PHONE NUMBER 
Waickman  Sarah      [email protected]        42101   Bowling green KY    1538 Chestnut Street 6153306000   
Ruud      Sarah      [email protected] 40508   Lexington     KY    300 N. Broadway      6067480000   
Dyment    John       [email protected]         40741   London        KY    216 Johnson Addition 6068624000   
Dayananda John       [email protected]     40206   Louisville    KY    513 Emery Rd.        5027410000   
Catlin    Sarah      [email protected] 40206   Louisville    KY    114 N Galt Ave       5029386000   
> queue save to results.csv
Saved to results.csv
> quit
Ciao, bella!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request