Commits

Roma Sokolov committed 12740f2

add datetime to output

Comments (0)

Files changed (1)

 # -*- coding:utf-8 -*-
 
+import time
+
 from functools import wraps
 
-
 def split_tags(func):
     @wraps(func)
     def wrapper(tags=''):
         if tags:
-            return func(*tags.split('/'))
+            return func(*(filter(None, map(unicode.strip, tags.split('/')))))
         else:
             return func()
     return wrapper
 
 def uni(st):
     return st.decode('utf-8')
+
+def format_output(pair):
+    (item, tmpstmp) = pair
+    item = uni(item)
+    dttm = time.strftime("%Y-%m-%d %H:%M", time.gmtime(tmpstmp))
+    return (item, dttm)