-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add quiet option Fix Mapnik Grid drop
- Loading branch information
Stéphane Brunner
committed
Aug 17, 2013
1 parent
6169a33
commit 82342fa
Showing
14 changed files
with
891 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import sys | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
def size_format(number): | ||
for unit in ['o', 'Kio', 'Mio', 'Gio', 'Tio']: | ||
if number < 1024.0: | ||
if number < 10: | ||
return "%.1f %s" % (number, unit) | ||
else: | ||
return "%.0f %s" % (number, unit) | ||
number /= 1024.0 | ||
|
||
|
||
def duration_format(duration): | ||
hours, remainder = divmod(duration.seconds, 3600) | ||
minutes, seconds = divmod(remainder, 60) | ||
if duration.days > 0: | ||
return '%i %i:%02i:%02i' % (duration.days, hours, minutes, seconds) | ||
else: | ||
return '%i:%02i:%02i' % (hours, minutes, seconds) |
Oops, something went wrong.