I run a small instrument lab. We track our user's time on the instruments with a very manual process of 'last wtmp.1' then cut/paste data into spreadsheets. My boss makes the initial spreadsheets then I convert and format them for uploading into our billing software (COReS). Cores is looking for a very specific set of data for each 'charge' in a csv file.
Primary Comments,Customer Account Number,Transaction Date,Service Description,Quantity,Unit,Price,Service Category,PI's Name,Purchaser's Last Name,Short Contributing Center Name,Resource Name,Line Item Assistant,Line Item Comments
And each "order" is like this-
600 NMR,201895**********,07/31/13,600 MHz,34.97,Hour,6,600 MHz,Ash,Ash,"""""",600 NMR,"""""",""""""
Currently I get instrument usage data from a small perl script (@ perl-wtmp-script - Pastebin.com ) and wtmp. All of our workstations are either Red Hat or CentOS. It's output is-
dronnow 40
dwright3 272
esoto1 52
ewhite5 36
gliu3 327
gshaw1 382
I'm looking for something that will take our users time on the instrument, add their supervisor (the ASH entry's above) and account number (201895**********) then output all that data into a csv file suitable for uploading into Cores. Any clue where to start?