From 75b5629a115510b94109915bea72f6688bc90b55 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 2 Mar 2012 16:17:12 +0400 Subject: [PATCH] rewritten image_gid(...) to be more flexible and stable (also squashed a fiew bugs), and some minor changes... Signed-off-by: Alex A. Naanou --- index2.py | 101 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a/index2.py b/index2.py index 74b20ff6..3123ccf1 100755 --- a/index2.py +++ b/index2.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.01''' -__sub_version__ = '''20120302022717''' +__sub_version__ = '''20120302161602''' __copyright__ = '''(c) Alex A. Naanou 2011''' @@ -84,35 +84,61 @@ SUBTREE_CLASSES = { # XXX need a strategy to check if two files that have the same GID are # identical, and if so, need to destinguish them in the GID... # might be a good idea to add a file hash -def image_gid(path): +# XXX not yet sure if this is unique enough to avoid conflicts if one +# photographer has enough cameras... +# XXX also might be wise to add a photographer ID into here... +def image_gid(path, format='%(artist)s-%(date)s-%(name)s', date_format='%Y%m%d-%H%M%S'): ''' Calgulate image GID. - Format: - -