changed path and basic time tracker script
parent
c3c0dac2eb
commit
b69aa74180
@ -0,0 +1,22 @@
|
||||
Alright, this system needs to be robust and easy to use. I shouldn't have to do ANYTHING extra to use this
|
||||
|
||||
2 ways to do it
|
||||
Have a file for each day and clock in and out
|
||||
have a master log and parse the log
|
||||
parsing the log seems significantly easier
|
||||
|
||||
File name can be generic because it gets cleaned as part of an accumulation script
|
||||
i.e. timesheet.log
|
||||
|
||||
Everytime a user logs in echo
|
||||
I, DATE, TIME to the file
|
||||
A logout or i3lock echos
|
||||
O, DATE, TIME to the same file
|
||||
|
||||
can be dead simple as far as the logging goes
|
||||
clock -i to clock in
|
||||
clock -o to clock out
|
||||
|
||||
Parser will have to be a bit more robust
|
||||
|
||||
|
@ -0,0 +1,31 @@
|
||||
I 10-03T16:24
|
||||
O 10-03T16:25
|
||||
I 10-03T16:25
|
||||
O 10-03T16:27
|
||||
I 10-03T16:27
|
||||
O 10-03T16:30
|
||||
I 10-03T16:31
|
||||
O 10-03T16:31
|
||||
I 10-05T09:52
|
||||
O 10-05T10:06
|
||||
I 10-05T10:06
|
||||
O 10-05T10:06
|
||||
I 10-05T10:15
|
||||
O 10-05T12:53
|
||||
I 10-05T17:18
|
||||
O 10-05T18:48
|
||||
I 10-06T13:21
|
||||
O 10-06T13:40
|
||||
I 10-07T11:37
|
||||
O 10-07T12:59
|
||||
I 10-07T16:13
|
||||
O 10-07T16:38
|
||||
I 10-07T17:06
|
||||
O 10-07T20:20
|
||||
I 10-08T14:22
|
||||
O 10-08T18:50
|
||||
I 10-09T14:35
|
||||
O 10-09T19:13
|
||||
I 10-10T10:35
|
||||
O 10-10T16:43
|
||||
I 10-11T11:28
|
@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
timestamp=$(date +%m-%dT%H:%M);
|
||||
timesheet="$HOME/.dotfiles/bin/timetracker/timesheet.log"
|
||||
|
||||
if [[ ! -e "$timesheet" ]] ; then
|
||||
touch "$timesheet"
|
||||
fi
|
||||
|
||||
if [[ $1 == "-i" ]] ; then
|
||||
echo "I $timestamp" >> "$timesheet"
|
||||
elif [[ $1 = "-o" ]] ; then
|
||||
echo "O $timestamp" >> "$timesheet"
|
||||
fi
|
@ -0,0 +1 @@
|
||||
Subproject commit 54fd9f5ba70ba907e683a42e2b1903133a98dd60
|
Loading…
Reference in New Issue