1
0
mirror of https://github.com/gryf/pygtktalog.git synced 2025-12-19 04:20:19 +01:00

Move misc and video modules into package pygtktalog.

This commit is contained in:
2009-05-04 16:19:48 +00:00
parent 36c4e7e4f2
commit ccec14f3ea
4 changed files with 4 additions and 4 deletions

View File

@@ -3,15 +3,14 @@
Description: Misc functions used more than once in src Description: Misc functions used more than once in src
Type: lib Type: lib
Author: Roman 'gryf' Dobosz, gryf73@gmail.com Author: Roman 'gryf' Dobosz, gryf73@gmail.com
Created: 2008-12-15 Created: 2009-04-05
""" """
def float_to_string(float_length): def float_to_string(float_length):
""" """
Parse float digit into time string Parse float digit into time string
Arguments: Arguments:
@string - width of generated image. If actual image width @number - digit to be converted into time.
exceeds this number scale is performed.
Returns HH:MM:SS formatted string Returns HH:MM:SS formatted string
""" """
hour = int(float_length / 3600); hour = int(float_length / 3600);
@@ -20,3 +19,4 @@ def float_to_string(float_length):
float_length -= minutes * 60 float_length -= minutes * 60
sec = int(float_length) sec = int(float_length)
return "%02d:%02d:%02d" % (hour, minutes, sec) return "%02d:%02d:%02d" % (hour, minutes, sec)

View File

@@ -12,7 +12,7 @@ import shutil
from tempfile import mkdtemp, mkstemp from tempfile import mkdtemp, mkstemp
import math import math
from misc import float_to_string from pygtktalog.misc import float_to_string
class Video(object): class Video(object):
"""Class for retrive midentify script output and put it in dict. """Class for retrive midentify script output and put it in dict.