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:
@@ -3,15 +3,14 @@
|
||||
Description: Misc functions used more than once in src
|
||||
Type: lib
|
||||
Author: Roman 'gryf' Dobosz, gryf73@gmail.com
|
||||
Created: 2008-12-15
|
||||
Created: 2009-04-05
|
||||
"""
|
||||
|
||||
def float_to_string(float_length):
|
||||
"""
|
||||
Parse float digit into time string
|
||||
Arguments:
|
||||
@string - width of generated image. If actual image width
|
||||
exceeds this number scale is performed.
|
||||
@number - digit to be converted into time.
|
||||
Returns HH:MM:SS formatted string
|
||||
"""
|
||||
hour = int(float_length / 3600);
|
||||
@@ -20,3 +19,4 @@ def float_to_string(float_length):
|
||||
float_length -= minutes * 60
|
||||
sec = int(float_length)
|
||||
return "%02d:%02d:%02d" % (hour, minutes, sec)
|
||||
|
||||
@@ -12,7 +12,7 @@ import shutil
|
||||
from tempfile import mkdtemp, mkstemp
|
||||
import math
|
||||
|
||||
from misc import float_to_string
|
||||
from pygtktalog.misc import float_to_string
|
||||
|
||||
class Video(object):
|
||||
"""Class for retrive midentify script output and put it in dict.
|
||||
Reference in New Issue
Block a user