mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
some refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
220ec2fefd
commit
6dec27b3d5
@ -1,7 +1,7 @@
|
|||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
__version__ = '''0.0.01'''
|
__version__ = '''0.0.01'''
|
||||||
__sub_version__ = '''20130525140732'''
|
__sub_version__ = '''20130528154633'''
|
||||||
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
||||||
|
|
||||||
|
|
||||||
@ -13,6 +13,7 @@ import json
|
|||||||
import sha
|
import sha
|
||||||
import urllib2
|
import urllib2
|
||||||
import time
|
import time
|
||||||
|
from optparse import OptionParser, OptionGroup
|
||||||
|
|
||||||
from pli.logictypes import OR
|
from pli.logictypes import OR
|
||||||
|
|
||||||
@ -396,8 +397,13 @@ def build_cache(path, config=CONFIG, gid_generator=hash_gid,
|
|||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
if __name__ == '__main__':
|
# Runtime...
|
||||||
from optparse import OptionParser, OptionGroup
|
#--------------------------------------------------handle_commandline---
|
||||||
|
def handle_commandline():
|
||||||
|
'''
|
||||||
|
Parse commandline args and act accordingly...
|
||||||
|
'''
|
||||||
|
res = None
|
||||||
|
|
||||||
parser = OptionParser(
|
parser = OptionParser(
|
||||||
usage='Usage: %prog [options] ROOT',
|
usage='Usage: %prog [options] ROOT',
|
||||||
@ -545,7 +551,7 @@ if __name__ == '__main__':
|
|||||||
report = make_inline_report_progress(progress_state)
|
report = make_inline_report_progress(progress_state)
|
||||||
|
|
||||||
# do the run...
|
# do the run...
|
||||||
build_cache(IN_PATH,
|
res = build_cache(IN_PATH,
|
||||||
config,
|
config,
|
||||||
hash_gid,
|
hash_gid,
|
||||||
report,
|
report,
|
||||||
@ -558,6 +564,14 @@ if __name__ == '__main__':
|
|||||||
print
|
print
|
||||||
print 'Time: %.1fm' % ((progress_state['done at'] - progress_state['started at'])/60)
|
print 'Time: %.1fm' % ((progress_state['done at'] - progress_state['started at'])/60)
|
||||||
|
|
||||||
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
|
||||||
|
handle_commandline()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
__version__ = '''0.0.01'''
|
__version__ = '''0.0.01'''
|
||||||
__sub_version__ = '''20130528153701'''
|
__sub_version__ = '''20130528154208'''
|
||||||
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
||||||
|
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ from pprint import pprint
|
|||||||
|
|
||||||
#-----------------------------------------------------------------------
|
#-----------------------------------------------------------------------
|
||||||
#----------------------------------------------------------build_dirs---
|
#----------------------------------------------------------build_dirs---
|
||||||
##!!! make this relative-path compatible...
|
##!!! make this figure out the path by itself...
|
||||||
def build_dirs(data, path, rewrite=None):
|
def build_dirs(data, path, rewrite=None):
|
||||||
'''
|
'''
|
||||||
rewrite can be:
|
rewrite can be:
|
||||||
@ -39,8 +39,6 @@ def build_dirs(data, path, rewrite=None):
|
|||||||
|
|
||||||
# gen3
|
# gen3
|
||||||
if version == '2.0':
|
if version == '2.0':
|
||||||
##!!! get base path...
|
|
||||||
##!!!
|
|
||||||
img = data['image_file']
|
img = data['image_file']
|
||||||
# absolute path...
|
# absolute path...
|
||||||
if img.startswith('file:///'):
|
if img.startswith('file:///'):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user