[Remind-Fans] Off topic, kind of

Rich Traube rlt4 at uchicago.edu
Sat Jan 2 17:27:28 EST 2010


Tildar,

I use remind and phpicalendar to schedule six employees.  Basically each
employee gets an event file which includes a "universal" holiday file
for my school's calendar.  You would also want to create a "can't work"
file for each employee to track conflicts.

Remind's -s output is very easy to parse; it also converts a hh:mm DURATION
directive into minutes, making it very easy to perform command line
calculations using a language such as awk.

To convert -s output to .ics I use a modification (see below) of
the awk script found at the remind wiki.  If you can grok this
script that should give you some ideas for how to check for employees
going over hour maximums, etc.

With phpicalendar you can select any set of calendars to view.  In
your case you could view one person's scheduled hours and their
"can't work" calendar to check for conflicts.

#!/usr/bin/awk -f
# rem2ics by Anthony J. Chivetta <achivetta at gmail.com>
# version 0.1 - 2006-06-09
# Converts output of remind -s to iCalendar
# usage: remind -s | rem2ics
#
# THE FOLLOWING CODE IS RELEASED INTO THE PUBLIC DOMAIN
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE
BEGIN {
print "BEGIN:VCALENDAR"
print "VERSION:2.0"
}
{
gsub("/","",$1)
print "BEGIN:VEVENT"
if ($5 != "*"){
printf("DTSTART:%dT%02d%02d00\n",$1,$5/60,$5%60)
min1 = $5%60+$4%60
if (min1 == 60) { min2 = 0 } else { min2 = min1 }
printf("DTEND:%dT%02d%02d00\n",$1,$5/60+$4/60,min2)
print "SUMMARY:" substr($0,match($0,$7))
} else {
printf("DTSTART:%d\n",$1)
print "SUMMARY:" substr($0,match($0,$6))
}
print "END:VEVENT"
}
END {print "END:VCALENDAR"}



On Sat, Jan 02, 2010 at 03:33:08PM -0600, Tildar wrote:
> That looks like it would do it, I'll see if i can get it working. Thanks Terry
> 
> Any other suggestions are still welcome.
> 
> On Sat, Jan 2, 2010 at 8:59 AM, Terry Brown <terry_n_brown at yahoo.com> wrote:
> > On Fri, 1 Jan 2010 16:40:29 -0600
> > Tildar <tildar at gmail.com> wrote:
> >
> >> I'm looking for a way to do scheduling for 4-5 employees across
> >> variable length shifts, one position, 7 days a week.
> >
> > http://faces.homeip.net/download.html might work, looks like it hasn't been updated recently, but certainly flexible.
> >
> > Cheers -Terry
> >
> >> I need the system to deal with the times employees are NOT available
> >> for some reason, Holiday, can't work shift x, etc
> >>
> >> I also need to cover basic "rules" like, no over 8 hour/day, 40
> >> hour/week, no more than x days a week, etc.
> >>
> >> I really want something similar to reminds flexibility, or a way to do
> >> this in remind. This MUST run on Linux at the very least.
> >>
> >> Anyone have any thoughts or ideas for me?
> >> _______________________________________________
> >> Remind-fans mailing list
> >> Remind-fans at lists.whatexit.org
> >> http://lists.whatexit.org/mailman/listinfo/remind-fans
> >>
> >
> > _______________________________________________
> > Remind-fans mailing list
> > Remind-fans at lists.whatexit.org
> > http://lists.whatexit.org/mailman/listinfo/remind-fans
> >
> _______________________________________________
> Remind-fans mailing list
> Remind-fans at lists.whatexit.org
> http://lists.whatexit.org/mailman/listinfo/remind-fans

-- 
Rich Traube             University of Chicago, SSA Library Supervisor
rlt4 at uchicago.edu                                      (773) 702-1199
http://www.lib.uchicago.edu/~rlt4/ssa-cal.html



More information about the Remind-fans mailing list