some tweaking...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2015-12-05 07:50:04 +03:00
parent 4b632bc3bf
commit c30b12d6b8
3 changed files with 16 additions and 5 deletions

View File

@ -591,6 +591,7 @@ function(json, changes){
// clean out some stuff from data...
delete res.data.tags.bookmark
delete res.data.tags.bookmark_data
delete res.data.tags.selected
delete res.data.tags

View File

@ -114,14 +114,16 @@ module.setupActions = function(viewer){
if(typeof(glob) != 'undefined'){
window.load2014 = function(){
return glob('l:/media/img/my/2014/*jpg')
.on('end', function(l){ window.a.loadURLs(l) })
return a.loadImages('l:/media/img/my/2014/')
//return glob('l:/media/img/my/2014/*jpg')
// .on('end', function(l){ window.a.loadURLs(l) })
}
window.loadInsta = function(){
return glob('l:/mnt/Dropbox/Instagram/fav/ALL/*+(jpg|png)')
.on('end', function(l){ window.a.loadURLs(l) })
return a.loadImages('l:/mnt/Dropbox/Instagram/fav/ALL/')
//return glob('l:/mnt/Dropbox/Instagram/fav/ALL/*+(jpg|png)')
// .on('end', function(l){ window.a.loadURLs(l) })
}

View File

@ -264,6 +264,8 @@ actions.Actions({
// XXX should this be here???
loadURLs: ['File/Load a URL list',
function(lst){
this.clear()
this.images = images.Images.fromArray(lst)
this.data = data.Data.fromArray(this.images.keys())
}],
@ -3331,6 +3333,9 @@ if(window.nodejs != null){
}
// XXX revise base path mechanics...
// .base_path
// .loaded_paths
var FileSystemLoaderActions = actions.Actions({
config: {
//'index-dir': '.ImageGrid',
@ -3464,6 +3469,9 @@ var FileSystemLoaderActions = actions.Actions({
return glob(path + '/*+(jpg|png)')
.on('end', function(lst){
that.loadURLs(lst)
// XXX not sure if this is the way to go...
that.base_path = path
})
}],
@ -3677,7 +3685,7 @@ var FileSystemWriterActions = actions.Actions({
logger = logger || this.logger
// XXX get real base path...
path = path || this.base_path +'/'+ this.config['index-dir']
//path = path || this.base_path +'/'+ this.config['index-dir']
file.writeIndex(
this.prepareIndexForWrite().prepared,