From 4b6d62a837b8a05b66387948f89170b30d36443a Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Wed, 22 May 2013 22:45:34 +0400 Subject: [PATCH] several tweeks + updated (and moved) exportdirs.py... Signed-off-by: Alex A. Naanou --- ui/exportdirs.py => exportdirs.py | 8 +++++--- ui/Gen3-TODO.otl | 1 + ui/data.js | 5 ++++- 3 files changed, 10 insertions(+), 4 deletions(-) rename ui/exportdirs.py => exportdirs.py (92%) diff --git a/ui/exportdirs.py b/exportdirs.py similarity index 92% rename from ui/exportdirs.py rename to exportdirs.py index efbfc26e..2c8461d4 100755 --- a/ui/exportdirs.py +++ b/exportdirs.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.01''' -__sub_version__ = '''20130520030454''' +__sub_version__ = '''20130522224356''' __copyright__ = '''(c) Alex A. Naanou 2011''' @@ -31,7 +31,8 @@ def build_dirs(data, path, rewrite=None): # gen3 if version == '2.0': - images = json.load(open(data['image_file'], 'r')) + #images = json.load(open(data['image_file'], 'r')) + images = json.load(urllib2.urlopen(data['image_file'])) def get_image(gid, _): return images[gid] @@ -83,7 +84,8 @@ def build_dirs(data, path, rewrite=None): if __name__ == '__main__': from optparse import OptionParser - parser = OptionParser() + parser = OptionParser( + usage='%prog [options] DATAJSON TARGETDIR') ##!!! need to define the path so that it shoes up in -h diff --git a/ui/Gen3-TODO.otl b/ui/Gen3-TODO.otl index 7f2efcd3..14275de6 100755 --- a/ui/Gen3-TODO.otl +++ b/ui/Gen3-TODO.otl @@ -1,5 +1,6 @@ [_] 18% Gen 3 current todo [_] 37% High priority + [_] ASAP: support relative paths in cache... [_] BUG: sometimes duplicate images get loaded... | this happens when jumping back and forth on the mid ribbon until | the last element shows up and then moving left until the frame diff --git a/ui/data.js b/ui/data.js index 7ea2c9d9..29ce3f63 100755 --- a/ui/data.js +++ b/ui/data.js @@ -711,7 +711,10 @@ function saveFile(name){ if(DATA.image_file == null){ DATA.image_file = name + '-images.json' } - CEF_dumpJSON(DATA.image_file, IMAGES) + //CEF_dumpJSON(DATA.image_file, IMAGES) + // XXX this will overwrite the images... + //CEF_dumpJSON(name + '-images.json', IMAGES) + //DATA.image_file = name + '-images.json' CEF_dumpJSON(name + '-data.json', DATA) CEF_dumpJSON(name + '-marked.json', MARKED)