accidently deleted the wrong script

nvim
KeeganForelight 2 years ago
parent bb13a86b1a
commit 9edbb2bbd9

@ -1,34 +0,0 @@
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
hell with a parser, I have a better system.
Steps
1) On login echo date, start time >> to a csv
2) On logout echo end time, total uptime \n to same csv
Ending format:
Date, Time in, Time out, Total
11/11, 11:00, 12:00, 1
3) On every wednesday mv to a non-temp file for tracking and destroy csv
notes)
- Should be robust as hell as it will log entries into a seperate entry for the same date which can be compressed manually
- Column -s -t ',' < csv should make for easy viewing in terminal
- should be deadsimple to implement a way to track pay periods or modifyed command for entries

@ -1,2 +0,0 @@
Date, Time In, Time Out, Total Time
Nov-28, 12:15, 14:30, 2:15
1 Date Time In Time Out Total Time
2 Nov-28 12:15 14:30 2:15

@ -1,105 +0,0 @@
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
O 10-11T12:29
I 10-11T14:54
O 10-11T18:56
I 10-12T09:45
O 10-12T12:23
I 10-12T15:39
O 10-12T17:06
I 10-13T09:55
O 10-13T10:30
I 10-14T15:25
O 10-14T17:19
I 10-16T13:19
O 10-16T17:00
I 10-17T10:15
O 10-17T13:41
I 10-18T13:22
O 10-18T13:54
I 10-18T14:11
O 10-18T18:00
I 10-19T10:22
O 10-19T13:00
I 10-19T13:25
O 10-19T16:59
I 10-19T17:23
O 10-19T18:34
I 10-21T12:04
O 10-21T12:51
I 10-23T14:59
O 10-23T17:19
I 10-24T13:07
O 10-24T13:57
I 10-25T15:34
O 10-25T17:53
I 10-26T11:57
O 10-26T19:47
I 10-27T17:56
O 10-27T20:23
I 11-01T13:40
O 11-01T18:13
I 11-02T13:24
O 11-02T18:57
I 11-03T12:59
O 11-03T15:53
I 11-03T17:07
O 11-03T18:31
I 11-04T19:07
O 11-04T19:34
I 11-07T15:15
O 11-07T17:11
I 11-08T13:58
O 11-08T17:27
I 11-09T17:02
O 11-09T19:05
I 11-10T13:19
O 11-10T21:12
I 11-11T16:03
O 11-11T20:24
I 11-14T13:39
O 11-14T14:20
I 11-14T14:23
O 11-14T14:23
I 11-15T17:06
O 11-15T21:11
I 11-16T15:11
O 11-16T17:09
I 11-17T14:34
O 11-17T22:01
I 11-18T15:25
O 11-18T19:39
I 11-20T15:34
O 11-20T19:22
I 11-21T15:10
O 11-21T19:09
I 11-28T12:20

@ -1,14 +0,0 @@
#!/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
Loading…
Cancel
Save