#!/usr/bin/env python
from __future__ import division
import sys

def drawpbar(val, m):
    ratio = val / m
    sys.stdout.write('\r[{0: <50}]{1: >4.0%}'.format('#' * int(ratio * 50), ratio))
    sys.stdout.flush()

@@ -15,16 +15,1628 @@
  python%0A
+# -*- encoding: utf-8 -*-%0A# River of Text%0A# Copyright %C2%A9 2013, Kwpolska.%0A# All rights reserved.%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions are%0A# met:%0A#%0A# 1. Redistributions of source code must retain the above copyright%0A#    notice, this list of conditions, and the following disclaimer.%0A#%0A# 2. Redistributions in binary form must reproduce the above copyright%0A#    notice, this list of conditions, and the following disclaimer in the%0A#    documentation and/or other materials provided with the distribution.%0A#%0A# 3. Neither the name of the author of this software nor the names of%0A#    contributors to this software may be used to endorse or promote%0A#    products derived from this software without specific prior written%0A#    consent.%0A#%0A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS%0A# %22AS IS%22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT%0A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR%0A# A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT%0A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,%0A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT%0A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,%0A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY%0A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT%0A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE%0A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.%0A
 from __f
@@ -1690,16 +1690,22 @@
 r(val, m
+, size
 ):%0A    r
@@ -1740,16 +1740,18 @@
 t.write(
+(u
 '%5Cr%5B%7B0: 
@@ -1751,18 +1751,34 @@
 %5Cr%5B%7B0: %3C
-50
+' + str(size) + u'
 %7D%5D%7B1: %3E4
@@ -1782,16 +1782,17 @@
  %3E4.0%25%7D'
+)
 .format(
@@ -1813,10 +1813,12 @@
 o * 
-50
+size
 ), r

add copyright and make it resizeable