keith p jolley (c) Sun Jul 1 11:37:59 PDT 2018 squalor heights, ca, usa
It's a tool to complement what VolunteerLocal provides to an event organizer. I recently helped coordinate ~500 volunteers over a weeklong event and had a couple of needs that were not being met out of the box. In particular I needed an overview of when/where I had people signed up and where we still needed to recruit more folks. Then, as we got closer to the day of we needed a way of knowing exactly who was supposed to be where and when, plus a way of seeing where we still had holes in the schedule.
For the overview requirement I used the timeline javascript library.
For the detailed view I used DataTables. DataTables has a JQuery dependency so I used it a bit on formatting and what-not.
This is a node express joint. It runs on port 9004 and I use nginx to proxy the connection:
#
location /swsdvolcal {
proxy_pass http://localhost:9004; # swsd startup week san diego volunteerl calendar
}
When debugging I like to run it as:
$ DEBUG=swsdvolcal:*;find app.js bin package.json routes credentials.js \( -type l -o -type f \) \! -name \.\* | entr -r npm start
which causes npm to restart everytime I save a file. Handy.
To use on your own project, download your data from: https://app.volunteerlocal.com/manage/?go=volunteer_export and "select all" on custom and standard fields.
Don't check "Group by...".
Do check "Show empty rows...".
Move the downloaded xxx.csv
into data/
and run bin/import.sh
.
The header on the downloaded file isn't quite what we want. It comes with some garbage chars in it. (?) Fix by running:
% bin/import.sh
To create 10(or fewer) random entries to help with debug:
$ n=10;(head -1 ./data/data.tsv;(while [ $n -gt 0 ];do let n=$n-1;awk 'NR>1' ./data/data.tsv|randomfile;done)|sort -u) > ./data/data-$n.tsv
To run as a service:
$ cp bin/swsdvolcal /etc/init.d/
$ sudo /etc/init.d/swsdvolcal start
The init script relies on the handy [forever](https://www.npmjs.com/package/forever)
npm module
(and I know the init script is ugly).
I included the script bin/anon.py
, which uses bin/names.txt
to remove the contact info of our volunteers. In
'production' I used the npm [express-basic-auth](https://www.npmjs.com/package/express-basic-auth)
module to read credentials.js
.
Auth is commented out now but use credentials.example.js
as a template. Your volunteers would probably not like their contact
info going out into the wild.