mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
added multiple directory processing to buildcache...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
d2362bd116
commit
cbe6f43234
@ -2,7 +2,7 @@
|
|||||||
#=======================================================================
|
#=======================================================================
|
||||||
|
|
||||||
__version__ = '''0.0.01'''
|
__version__ = '''0.0.01'''
|
||||||
__sub_version__ = '''20140112165326'''
|
__sub_version__ = '''20140121064724'''
|
||||||
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
||||||
|
|
||||||
|
|
||||||
@ -859,7 +859,7 @@ def handle_commandline():
|
|||||||
res = None
|
res = None
|
||||||
|
|
||||||
parser = OptionParser(
|
parser = OptionParser(
|
||||||
usage='Usage: %prog [options] ROOT',
|
usage='Usage: %prog [options] DIRS',
|
||||||
version='%prog ' + __version__,
|
version='%prog ' + __version__,
|
||||||
epilog='Notes: This script is still experimental. '
|
epilog='Notes: This script is still experimental. '
|
||||||
'GID source default will change to "metadata" '
|
'GID source default will change to "metadata" '
|
||||||
@ -949,7 +949,7 @@ def handle_commandline():
|
|||||||
default=False,
|
default=False,
|
||||||
help='Save current configuration at the root location. '
|
help='Save current configuration at the root location. '
|
||||||
'this is a shorthand for: '
|
'this is a shorthand for: '
|
||||||
'%prog ... --config-print > ROOT/CONFIG; %prog')
|
'%prog ... --config-print > DIR/CONFIG; %prog')
|
||||||
parser.add_option_group(configuration)
|
parser.add_option_group(configuration)
|
||||||
|
|
||||||
|
|
||||||
@ -967,9 +967,16 @@ def handle_commandline():
|
|||||||
|
|
||||||
# prepare the path...
|
# prepare the path...
|
||||||
if len(args) < 1:
|
if len(args) < 1:
|
||||||
IN_PATH = u'.'
|
args = [u'.']
|
||||||
else:
|
|
||||||
IN_PATH = args[0]
|
times = []
|
||||||
|
|
||||||
|
##!!! move all that is not needed in the loop to outside the loop...
|
||||||
|
for IN_PATH in args:
|
||||||
|
|
||||||
|
if len(times) > 0:
|
||||||
|
print
|
||||||
|
|
||||||
IN_PATH = IN_PATH.replace('\\', '/')
|
IN_PATH = IN_PATH.replace('\\', '/')
|
||||||
##!!! need to convert this ut utf-8...
|
##!!! need to convert this ut utf-8...
|
||||||
if not options.force_ascii and type(IN_PATH) != unicode:
|
if not options.force_ascii and type(IN_PATH) != unicode:
|
||||||
@ -1011,9 +1018,9 @@ def handle_commandline():
|
|||||||
if options.config_save_local:
|
if options.config_save_local:
|
||||||
with open(os.path.join(IN_PATH, config_name), 'w',
|
with open(os.path.join(IN_PATH, config_name), 'w',
|
||||||
encoding='ascii' if config['force-ascii'] else 'utf-8') as f:
|
encoding='ascii' if config['force-ascii'] else 'utf-8') as f:
|
||||||
## ##!!! json.dump writes some "strings" as unicode and some as str
|
## ##!!! json.dump writes some "strings" as unicode and some as str
|
||||||
## ##!!! this breaks fp.write(...)...
|
## ##!!! this breaks fp.write(...)...
|
||||||
## f.write(json.dumps(config, sort_keys=True, indent=4, ensure_ascii=config['force-ascii']))
|
## f.write(json.dumps(config, sort_keys=True, indent=4, ensure_ascii=config['force-ascii']))
|
||||||
s = json.dumps(config, sort_keys=True, indent=4, ensure_ascii=config['force-ascii'])
|
s = json.dumps(config, sort_keys=True, indent=4, ensure_ascii=config['force-ascii'])
|
||||||
if not config['force-ascii'] and type(s) != unicode:
|
if not config['force-ascii'] and type(s) != unicode:
|
||||||
s = s.decode(DEFAULT_ENCODING)
|
s = s.decode(DEFAULT_ENCODING)
|
||||||
@ -1060,8 +1067,14 @@ def handle_commandline():
|
|||||||
|
|
||||||
# report results...
|
# report results...
|
||||||
if verbosity >= 1:
|
if verbosity >= 1:
|
||||||
|
times += [(progress_state['done at'] - progress_state['started at'])/60]
|
||||||
print
|
print
|
||||||
print 'Time: %.1fm' % ((progress_state['done at'] - progress_state['started at'])/60)
|
print 'Time: %.1fm' % (times[-1],)
|
||||||
|
|
||||||
|
# report results...
|
||||||
|
if verbosity >= 1 and len(times) > 1:
|
||||||
|
print
|
||||||
|
print 'Total time: %.1fm' % (sum(times),)
|
||||||
|
|
||||||
## # XXX this makes the script spit out res to stdout...
|
## # XXX this makes the script spit out res to stdout...
|
||||||
## return res
|
## return res
|
||||||
|
|||||||
@ -322,6 +322,7 @@ var getElementScale = makeCSSVendorAttrGetter(
|
|||||||
return parseFloat((/(scale|matrix)\(([^),]*)\)/).exec(data)[2])
|
return parseFloat((/(scale|matrix)\(([^),]*)\)/).exec(data)[2])
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
var getElementShift = makeCSSVendorAttrGetter(
|
var getElementShift = makeCSSVendorAttrGetter(
|
||||||
'transform',
|
'transform',
|
||||||
{left: 0, top: 0},
|
{left: 0, top: 0},
|
||||||
@ -340,7 +341,6 @@ var getElementTransitionDuration = makeCSSVendorAttrGetter(
|
|||||||
parseInt)
|
parseInt)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// NOTE: at this point this works only on the X axis...
|
// NOTE: at this point this works only on the X axis...
|
||||||
function setElementTransform(elem, offset, scale, duration){
|
function setElementTransform(elem, offset, scale, duration){
|
||||||
elem = $(elem)
|
elem = $(elem)
|
||||||
@ -513,6 +513,7 @@ function animateElementTo(elem, to, duration, easing, speed, use_transitions){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function stopAnimation(elem){
|
function stopAnimation(elem){
|
||||||
if(elem.next_frame){
|
if(elem.next_frame){
|
||||||
cancelAnimationFrame(elem.next_frame)
|
cancelAnimationFrame(elem.next_frame)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user