mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
started work on indexing...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
828855401f
commit
ebd2865fed
49
TODO.otl
49
TODO.otl
@ -1,4 +1,46 @@
|
|||||||
[_] 14% general tasks
|
[_] 5% roadmap
|
||||||
|
[_] 12% pre-production: staging and test
|
||||||
|
[_] 50% test input
|
||||||
|
[X] clean - RAW
|
||||||
|
[X] rated (old) - RAW, XMP
|
||||||
|
[X] rated (new) - RAW, XMP, preview (RAW)
|
||||||
|
[_] processed (old) - RAW, XMP, PSD, preview
|
||||||
|
[_] processed (new) - RAW, XMP, PSD, preview, preview (RAW)
|
||||||
|
[_] missing previews...
|
||||||
|
[_] 0% setup archive
|
||||||
|
[_] 0% setup backup
|
||||||
|
[_] 0% setup testing
|
||||||
|
[_] stage
|
||||||
|
[_] create / build
|
||||||
|
[_] backup
|
||||||
|
[_] test consistency
|
||||||
|
[_] 11% stage I: basic workflow
|
||||||
|
[_] 33% import
|
||||||
|
[_] list files
|
||||||
|
[X] generate previews
|
||||||
|
[_] load metadata
|
||||||
|
[_] 0% generate tags
|
||||||
|
[_] data
|
||||||
|
[_] workflow
|
||||||
|
[X] populate preview metadata
|
||||||
|
[_] match files
|
||||||
|
| match and group coresponding RAW, PSD, preview and preview (RAW)
|
||||||
|
[_] 0% search / select
|
||||||
|
[_] 0% output:
|
||||||
|
[_] list of paths
|
||||||
|
[_] list of IDs
|
||||||
|
[_] 0% update (tags)
|
||||||
|
[_] 0% stage II: advanced workflow
|
||||||
|
[_] sync
|
||||||
|
| write data to previews and originals
|
||||||
|
[_] export
|
||||||
|
| copy a list of previews to a given location and maintain consistency
|
||||||
|
[_] 0% stage III: GUI
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
[_] 13% general tasks
|
||||||
[_] 0% actions:
|
[_] 0% actions:
|
||||||
[_] import
|
[_] import
|
||||||
[_] export/build
|
[_] export/build
|
||||||
@ -13,7 +55,7 @@
|
|||||||
[_] 0% sync
|
[_] 0% sync
|
||||||
[_] 0% UI
|
[_] 0% UI
|
||||||
[_] HTML/HTML5
|
[_] HTML/HTML5
|
||||||
[_] QT (???)
|
[_] QT/PySide
|
||||||
[_] command-line
|
[_] command-line
|
||||||
[_] ig
|
[_] ig
|
||||||
| root script... name not final yet...
|
| root script... name not final yet...
|
||||||
@ -47,11 +89,12 @@
|
|||||||
| this can happen when adding a new object to a tag via an .update(...) method, in-place.
|
| this can happen when adding a new object to a tag via an .update(...) method, in-place.
|
||||||
|
|
|
|
||||||
| need to use immutable data only.
|
| need to use immutable data only.
|
||||||
[_] 33% compleate the new tags module
|
[_] 20% compleate the new tags module
|
||||||
[X] .relatedtags(...)
|
[X] .relatedtags(...)
|
||||||
[_] see if we need strict and non-strict .relatedtags(...)
|
[_] see if we need strict and non-strict .relatedtags(...)
|
||||||
[_] concatinative mode or abbility to build new tagsets from selections
|
[_] concatinative mode or abbility to build new tagsets from selections
|
||||||
[_] tag chains support...
|
[_] tag chains support...
|
||||||
|
[_] build a new tagset from list of objects or tags...
|
||||||
[_] import test images and ratings
|
[_] import test images and ratings
|
||||||
[_] importer based on xmpgen
|
[_] importer based on xmpgen
|
||||||
[X] need unique image id
|
[X] need unique image id
|
||||||
|
|||||||
71
index.py
Executable file
71
index.py
Executable file
@ -0,0 +1,71 @@
|
|||||||
|
#=======================================================================
|
||||||
|
|
||||||
|
__version__ = '''0.0.01'''
|
||||||
|
__sub_version__ = '''20111103010916'''
|
||||||
|
__copyright__ = '''(c) Alex A. Naanou 2011'''
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
import os
|
||||||
|
import json
|
||||||
|
|
||||||
|
from pli.logictypes import OR
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
CONFIG_NAME = 'config.json'
|
||||||
|
|
||||||
|
config = json.load(open(CONFIG_NAME))
|
||||||
|
|
||||||
|
ITEM_EXTENSIONS = (
|
||||||
|
# RAW formats...
|
||||||
|
'NEF', 'nef',
|
||||||
|
# JPEGs...
|
||||||
|
'JPG', 'JPEG', 'jpg', 'jpeg',
|
||||||
|
# Editid images...
|
||||||
|
'PSD', 'psd',
|
||||||
|
'TIFF', 'tiff', 'TIF', 'tif',
|
||||||
|
# metadata sidecar files...
|
||||||
|
'XMP', 'xmp',
|
||||||
|
)
|
||||||
|
|
||||||
|
SUBTREE_CLASSES = {
|
||||||
|
'preview': 'preview',
|
||||||
|
'preview (RAW)': 'RAW preview',
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
|
||||||
|
def list_files(root, sub_trees=SUBTREE_CLASSES, ext=OR(*ITEM_EXTENSIONS)):
|
||||||
|
'''
|
||||||
|
'''
|
||||||
|
for path, dirs, files in os.walk(root):
|
||||||
|
# clasify by subtree...
|
||||||
|
p = os.path.split(path)
|
||||||
|
subtree_type = None
|
||||||
|
for t in sub_trees:
|
||||||
|
if t in p:
|
||||||
|
subtree_type = sub_trees[t]
|
||||||
|
break
|
||||||
|
# process files...
|
||||||
|
for f in files:
|
||||||
|
# filter by ext...
|
||||||
|
if f.split('.')[-1] == ext:
|
||||||
|
yield subtree_type, path, f
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------------------------------------------------------------
|
||||||
|
if __name__ == '__main__':
|
||||||
|
lst = list(list_files(config['ARCHIVE_ROOT']))
|
||||||
|
|
||||||
|
print len(lst)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#=======================================================================
|
||||||
|
# vim:set ts=4 sw=4 nowrap :
|
||||||
Loading…
x
Reference in New Issue
Block a user