| ||
| ° Home ° Forums ° Statistics ° Sign Up ° Search ° Manual ° |
| PM forums / Developing GanttPV / small change to the Export to HTML script |
| Author | Message |
| Anonymous |
# Posted: 23 May 2007 19:55:37 - I find the code hard to read through as the use of variable names is very very very cryptic. -- Does python have a penalty for using more verbose variable names? I am interested in adding functionality that will cross out the name if the percent complete is 100. However, if dh == 0: cl = "off" elif es < (dh + cumh) and ef > cumh: # cl = "task" if task.get("ActualEndDate"): cl = "complete" elif task.get("PercentComplete"): # is this cell end past current position in task # if task.get("PercentComplete") >= (( cumh + dh - es )*100 / (ef-es)): # old formula pc = task.get("PercentComplete") position = es + (pc * (ef-es) / 100) # current position of task if pc == 100 or position >= (cumh + dh): cl = "complete" else: cl = "task" else: cl = "task" is near unreadable! |
| Anonymous |
# Posted: 25 May 2007 13:23:11 - Sorry for my earlier rant. -- I have made a small change to the Print - Export/Export to HTML.py script. I emailed the change to Brian at PureViolet dot net but it was bounced back to me. Here's the text of the email: <quote> Hi, I have a very small change to the Scripts/Print - Export/Export as HTML.py script. This change adds a strikethrough to non empty cells when a task is marked as 100% complete or has an actual date completed. Sorry I don't actually have access to svn, so I just copied the file from svn via the browser, and did a diff against my own file. I have also provided my file called "My Export as HTML.py". Let me know what you think. Thanks. </quote> <code> E:ProjectManagementGanttPVScriptsPrint - Export>more diff.diff 35c35 < --- > # 070523 - Pete - Added strikethrough for completed items. 355c355,370 < fp.write(MakeString(value)) --- > > percentComplete = 0 > task = Data.Database['Task'][tid] > percentComplete = task.get("PercentComplete") > > if (percentComplete == 100) or task.get("ActualEndDate"): > if(value == ' ') or (value == ''): # if the cell contents are empty don't strike through > fp.write(MakeString(value)) > else: > fp.write('<strike>') > fp.write(MakeString(value)) > fp.write('</strike>') > > else: > fp.write(MakeString(value)) > 356a372 > </code> |
| Alexander Moderator |
# Posted: 11 Sep 2007 22:05:17 - Thanks. I'm happy to see people making their own improvements to the scripts. Hope you enjoy GanttPV! Regards, Alex |
| This topic is closed. You can`t post a reply. |
|
Powered by mini BB forum software © 2001-2010 |