timesheetpy

simple timesheet generator
git clone git://parazyd.org/timesheetpy.git
Log | Files | Refs | README | LICENSE

commit a4dd08d26f2875f265187d87cba60e0ec3c2dd33
parent adf8a9ad6bee2dff49228c23698e54b4f1326f2d
Author: parazyd <parazyd@dyne.org>
Date:   Fri, 28 Oct 2016 15:45:08 +0200

document -n|--name; add total days, add total hrs

Diffstat:
MREADME.md | 4++--
Mtimesheet | 11++++++++---
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md @@ -15,7 +15,7 @@ package manager or `pip` to find it and install it. ``` usage: timesheet [-h] [-sm START_MONTH] [-sy START_YEAR] [-em END_MONTH] - [-ey END_YEAR] [-o OUTPUT_FILE] + [-ey END_YEAR] [-n NAME] [-o OUTPUT_FILE] optional arguments: -h, --help show this help message and exit @@ -27,6 +27,7 @@ optional arguments: ending month, ex: 11 -ey END_YEAR, --end-year END_YEAR ending year, ex: 2016 + -n NAME, --name NAME name of person, ex: 'John Doe' -o OUTPUT_FILE, --output-file OUTPUT_FILE output file, ex: timesheet.xlsx ``` @@ -34,7 +35,6 @@ optional arguments: It is not necessary to specify any argument. In that case, timesheetpy will create a timesheet for the current month called `timesheet.xlsx` - ## licensing timesheetpy is copyright (c) 2016 by the Dyne.org Foundation diff --git a/timesheet b/timesheet @@ -90,7 +90,8 @@ format_bold = workbook.add_format({ format_centerbold = workbook.add_format({ 'bold': True, - 'align': 'center' + 'align': 'center', + 'font_name': 'Inconsolata' }) format_vcenterbold = workbook.add_format({ @@ -110,7 +111,7 @@ format_centerbigger = workbook.add_format({ ## }}} def putDefaults(mm, yy): - #worksheet.set_column('A:A', 15) ## make first column wider + worksheet.set_column('A:A', 12) ## make first column wider worksheet.set_row(0, 30) worksheet.write('A1', 'STICHTING DYNE.ORG', format_vcenterbold) @@ -126,7 +127,8 @@ def putDefaults(mm, yy): worksheet.merge_range('B3:C3', args.name, format_centerbigger) #worksheet.write('B3', args.name, format_centerbigger) - #worksheet.merge_range('E3:F3', 'Total hrs. worked:', format_bold) + worksheet.write('A4', "Total hrs:", format_centerbigger) + worksheet.write('A5', "Total days:", format_centerbigger) worksheet.set_row(5, 30) worksheet.merge_range('B6:G6', 'TIMESHEET', format_centerbigger) @@ -195,8 +197,11 @@ def writetotals(): for col in range(66,73): if col == 72: fmt = format_timegridGrey + worksheet.write('B4', '=SUM('+chr(col)+due+':'+chr(col)+tre+')', fmt) + worksheet.write('B5', '=COUNTIFS('+chr(col)+due+':'+chr(col)+tre+',"<>0")', fmt) worksheet.write(chr(col)+uno, '=SUM('+chr(col)+due+':'+chr(col)+tre+')', fmt) + def calendar(mm, yy): month = monthrange(yy, mm) head = weekheader(3)