VansAirForceForums  
Home > VansAirForceForums

- POSTING RULES
- Donate yearly (please).
- Advertise in here!

- Today's Posts | Insert Pics


Go Back   VAF Forums > Main > RV General Discussion/News
Register FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-23-2016, 04:26 PM
unitink72 unitink72 is offline
 
Join Date: Oct 2014
Location: Cedar Rapids, IA
Posts: 226
Default Simple time logging script

Thought I would share this in case anyone else finds it useful.

I wrote a very simple time logging script in python. You run it, and it just sits there asking when you want to start the timer. After starting, you can either cancel or end. And if you end, you can put in a comment. It produces a csv file that you can read in excel:

Start Time, End Time, Elapsed Time, Comment
2016-11-16 20:27:01, 2016-11-16 22:33:47, 7605, inventory
2016-11-17 20:11:47, 2016-11-17 22:34:23, 8555, inventory done
2016-11-18 09:08:02, 2016-11-18 12:17:45, 11382, 6-2 VS spar


Here is the code. You may want to customize logFileName. I run this on linux, hence the unix-style path.

Code:
import datetime
import os.path

logFileName = '/home/tink/rv/rvWorkLog.txt'
userIn = ''
startTime = 0
endTime   = 0

if not os.path.isfile(logFileName):
     print('Log does not exist %s' % logFileName)
     userIn = input ('Create it? [Y/N]  ')
     if 'y' in userIn or 'Y' in userIn:
          logF = open(logFileName, 'w+')
          logF.write('Start Time, End Time, Elapsed Time, Comment\n')
          logF.close()
     else:
          exit ('Exiting')


while (1):
     while ('s' not in userIn):
          userIn = input ('[s]tart          ')

     startTime = datetime.datetime.now()

     while ('e' not in userIn and 'c' not in userIn):
          userIn = input ('[e]nd [c]ancel   ')
     
     if 'c' in userIn:
          continue

     endTime = datetime.datetime.now()
     userIn = input ('Comment          ')
     logF = open(logFileName, 'a')
     logF.write('%s, %s, %s, %s\n' % (startTime.strftime('%Y-%m-%d %H:%M:%S'), \
                                      endTime.strftime('%Y-%m-%d %H:%M:%S'),   \
                                      (endTime - startTime).seconds,           \
                                      userIn))
     userIn = ''
     logF.close()
#end while
__________________
Josh T
RV-10 #1750
N67SC reserved
http://n67sc.blogspot.com/
2019 Dues Paid
Reply With Quote
  #2  
Old 11-24-2016, 06:51 AM
rdamazio's Avatar
rdamazio rdamazio is offline
 
Join Date: Dec 2013
Location: Santa Clara, CA
Posts: 249
Default

Thought I'd share my time tracking solution - I already take timelapse videos of my build anyway. Each day after I'm done, I download the video, take the time in seconds and put it in a spreadsheet. Since it's recording at 2fps, I multiply by 15 to get the actual time (no, I don't account for drop-frame ).

Here's my time spreadsheet, done entirely that way:
https://docs.google.com/spreadsheets...l_WYyNEHU/edit
__________________
Rodrigo Damazio Bovendorp
San Jose, CA
RV-10 builder #41623
Build log at http://www.airplane.build/
VAF dues paid
Reply With Quote
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 11:35 PM.


The VAFForums come to you courtesy Delta Romeo, LLC. By viewing and participating in them you agree to build your plane using standardized methods and practices and to fly it safely and in accordance with the laws governing the country you are located in.