File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 1
- import os
2
1
import arrow
3
2
import human
4
3
humanbytes = human .bytes
5
4
6
5
def formatdoc (doc ):
7
6
8
7
path = doc .url [7 :]
9
- dirname = os .path .dirname (path )
10
8
hint = '/' .join (map (lambda x : x [:2 ], path .split ('/' )[3 :- 1 ]))
11
9
12
10
try :
13
- timestamp = arrow .get (doc .mtime )
14
- htime = timestamp .humanize ()
15
- hdate = timestamp .format ('YYYY-MM-DDTHH:mm:ssZZ' )
11
+ timestamp = arrow .get (doc .mtime )
12
+ htime = timestamp .humanize ()
13
+ hdate = timestamp .format ('YYYY-MM-DDTHH:mm:ssZZ' )
16
14
except Exception as e :
17
- htime = 'unknown'
18
- hdate = 'unknown'
15
+ htime = 'unknown'
16
+ hdate = 'unknown'
19
17
20
18
try :
21
- hbytes = humanbytes (int (doc .fbytes ))
19
+ hbytes = humanbytes (int (doc .fbytes ))
22
20
except Exception as e :
23
- hbytes = 'unknown'
21
+ hbytes = 'unknown'
24
22
25
23
formatarray = ['{htime}' , '>' ]
26
24
You can’t perform that action at this time.
0 commit comments