ProgressBar

Description

Goal

The ProgressBar macro generates a table showing a progress indicator.

Macro Synopsis

Usage:
  [[ ProgressBar ]]
  [[ ProgressBar (TABLEWIDTH TABLEFORMAT PROGRESS%) ]]
  [[ ProgressBar (TABLEWIDTH TABLEFORMAT CURRENT/STEPS) ]]
  [[ ProgressBar (TABLEWIDTH TABLEFORMAT STARTDATE,ENDDATE) ]]  

If no arguments are given, the usage is inserted in the HTML result.

Options:

  TABLEWIDTH (optional prefix)
    A wiki tablewidth attribute value between []'s
    Examples:
      [100%]
      [80px]

  TABLEFORMAT (optional prefix)
    A pair of wiki table attribute, to format the inactive and active cells.
    Examples:
      <bgcolor="black"><bgcolor="white">                   # black on white bar
      <tablewidth="90%" bgcolor="black"><bgcolor="white">  # same, 90% table

    A third format may be given for STARTDATE,ENDDATE usage

    By default: <tablewidth="100px"#808080><><#8080ff>

  PROGRESS
    Will display a table with two cells:
    - left: completion, taking PROGRESS % of the table width
    - right: remaining

  CURRENT/STEPS
    Will display a table with STEPS cells, CURRENT of which are active.

  STARTDATE,ENDDATE
    Will display a table with the number of days, with the cell
    representing today in active format and background in inactive format.

    If today is before STARTDATE, the left-most cell will be in the
    3rd format. If today is after ENDDATE the rightmost cell will be
    in the 3rd format.

    Dates are in this format: YYYY-MM-DD

Debugging
  Please prepend a '?' to the arguments.

Author

PascalBauermeister - <pascal DOT bauermeister AT gmail DOT com>

Download & Release Notes

Download

Release Version

Moin Version

Release Notes

ProgressBar.py.moin191

1.9.1

modified a bit for this version -- anonymous

ProgressBar.py

1.3

ProgressBar-0.1.1.py

Known bugs

Feature requests

Change Log

Examples

Default colors and size

[[ProgressBar(80%)]]

Change progress bar color (using #)

[[ProgressBar(<#8080ff> 30%)]]

Change progress bar color and background (using color names)

[[ProgressBar(<bgcolor="orange"><bgcolor="lightgrey"> 60%)]]

Remaining instead of done

[[ProgressBar(<><#ff0000>80%)]]

x of N

[[ProgressBar(0/10)]]

[[ProgressBar(6/10)]]

[[ProgressBar(10/10)]]

[[ProgressBar(20/10)]]

[[ProgressBar(15/20)]]

Dates

[[ProgressBar(2006-11-01,2007-01-06)]]

[[ProgressBar(2005-11-01,2005-11-30)]]

[[ProgressBar(2026-11-01,2026-11-30)]]

Changing table width

[[ProgressBar([50%] 60%)]]

[[ProgressBar([50px] 60%)]]

[[ProgressBar([150px]<#8080ff><#808080> 9/12)]]

[[ProgressBar([50px] 6/10)]]

[[ProgressBar([250px] 2005-11-01,2006-01-06)]]

Bar length error

/!\ the old "funny effects" is gone in my installation. The bars (that should also should have the same length with background white) did have different lengths.I do not know why it is gone. I do not have a new browser. It also seems to be displayed differently in different browsers

I just wanted to test straight in 10 % steps what it will look like. Let's inlcude some /BarLengthSnapshots.

Ideas

Discussion

Is it right to use tables? I think yes (from the logical markup perspective). I would like to also have the percentage number optional in the field (fitting the colors), because it gives additional information that I do not have to present outside this table. I don#t quite understand how layout is going: What I've see so far is in Moin 1.5beta6

[[ProgressBar(80%)]] 

<div>
<table>
<tr>
<td style="background-color: #808080;">
<p> </p>
</td>

<td>
<p> </p>
</td>
</tr>
</table>
</div>

Where does the Progressbar gets its information about percentage? Is this filtered out in 1.5beta6 or did I just not find it? -- ThiloPfennig 2005-12-18 11:08:07

What about including this extention to the core? I think it could be core because it is of general use for many users. Like MonthCalendar. Is this extention mature enough?

MoinMoin: MacroMarket/ProgressBar (last edited 2010-02-17 07:14:31 by 3-225)