Skip to content

Commit

Permalink
Several minor changes in the script.
Browse files Browse the repository at this point in the history
Changed user name and added check of non-blank symbols in
_wingettotalresttime script.
  • Loading branch information
LeonidBeynenson committed Sep 1, 2016
1 parent 48fcb56 commit d2e0c60
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions _wingettotalresttime.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ def print_table(list_of_rows):
print tab.draw()

def DEFAULT_FOLDER_WITH_LOGS():
return "/home/leonid/worklog/"
#return "/home/leonid/worklog/"
return "/home/lbeynens//worklog/"

def get_default_worklog():
filelist = os.listdir(DEFAULT_FOLDER_WITH_LOGS())
Expand Down Expand Up @@ -67,12 +68,13 @@ def parse_file(filename):

date_re = re.compile(r'^[0-9-_]+')
rest_re = re.compile(r'^rest +(\d+) +min')
something_re = re.compile(r'^\s*[a-zA-Z0-9_-]')

lines = [line.rstrip(' \n') for line in open(filename)]

last_start_of_sitting_date = None
for line in lines:
if not line:
if not something_re.match(line):
last_start_of_sitting_date = None
continue # it may be a bit faster, although worser for debugging

Expand Down
1 change: 0 additions & 1 deletion subtract_lines.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python

import time
import re
import sys
import datetime
Expand Down
2 changes: 1 addition & 1 deletion winnamelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

ls -1 /home/leonid/worklog/winlog_* | grep "/winlog_20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]$" | tail -n1
ls -1 /home/lbeynens//worklog/winlog_* | grep "/winlog_20[0-9][0-9]-[0-9][0-9]-[0-9][0-9]$" | tail -n1
2 changes: 1 addition & 1 deletion winstartlog_always
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
cd /home/leonid/bin/linux-app-logger
cd /home/lbeynens//bin/linux-app-logger
#./logger.py winlog_`ddate` 30 stopfile 2>>2_stream.log
./logger.py ~/worklog 15 2>>2_stream.log

0 comments on commit d2e0c60

Please sign in to comment.