mirror of
https://forge.chapril.org/tykayn/mapillary_download
synced 2025-06-20 01:34:43 +02:00
Write exif metadata (Quick &Dirty)
This commit is contained in:
parent
a02ca67360
commit
c79ba8a65d
15 changed files with 3771 additions and 4 deletions
27
lib/io.py
Normal file
27
lib/io.py
Normal file
|
@ -0,0 +1,27 @@
|
|||
import os
|
||||
import errno
|
||||
import sys
|
||||
|
||||
|
||||
def mkdir_p(path):
|
||||
'''
|
||||
Make a directory including parent directories.
|
||||
'''
|
||||
try:
|
||||
os.makedirs(path)
|
||||
except os.error as exc:
|
||||
if exc.errno != errno.EEXIST or not os.path.isdir(path):
|
||||
raise
|
||||
|
||||
|
||||
def progress(count, total, suffix=''):
|
||||
'''
|
||||
Display progress bar
|
||||
sources: https://gist.github.com/vladignatyev/06860ec2040cb497f0f3
|
||||
'''
|
||||
bar_len = 60
|
||||
filled_len = int(round(bar_len * count / float(total)))
|
||||
percents = round(100.0 * count / float(total), 1)
|
||||
bar = '=' * filled_len + '-' * (bar_len - filled_len)
|
||||
sys.stdout.write('[%s] %s%s %s\r' % (bar, percents, '%', suffix))
|
||||
sys.stdout.flush()
|
Loading…
Add table
Add a link
Reference in a new issue