INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Sorting pictures like in picasa  (Read 2038 times)

gummbah

  • World Citizen
  • ***
  • Posts: 240
Sorting pictures like in picasa
« on: June 24, 2008, 01:33:55 am »

I have my photos sorted on my harddrive in two folders like this:

c:\photos\backed up\Trip to Berlin (Jan2007)
c:\photos\backed up\Trip to New York (Mar2007)
etc
c:\photos\not backed up\Biking (Feb2008)
c:\photos\not backed up\Skiing (Jun2008)
etc

I really like that Picassa without any configuration sorts my photo's like this:

2008
  |
  --> Skiing (Jun2008)
  |
  --> Biking (Feb2008)
2007
  |
  --> Trip to New York(Mar2007)
  |
  --> Trip to Berlin (Jan2007)

So it sorts first by year, and then the path names chronologically (not full path, but only last dir name and starting with the newest)

Is there any way to replicate this in MC?

Thanks
Logged

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: Sorting pictures like in picasa
« Reply #1 on: June 24, 2008, 07:27:55 am »

Create a new view scheme

Add 2 view items
  • [Year]
  • and a new expression called "Last Folder" (or whatever you want)
The "Last Folder" expression item should contain the following ...
Code: [Select]
ListItem([Filename (path)],ListCount(RemoveLeft([FileName (path)],3),\),\)
What this does is (working from the inside out)
1) removes the volume from the filepath i.e. "z:\Photos\Folder1\Description" yields "Photos\Folder1\Description" - we need to do this as listitem(listcount) returns the nth as opposed to the (n-1)th item in the list count (see next)
2) counts how many "list items" (i.e. folders) are left in the path. (it looks for items delimited by the "\" character)
3) returns the last of the items (the last folder) in the file path

It's kinda clunky as we can't use arithmetic to do listcount-1 (at least not that I know of). You'll also want to be careful with UNC based paths (e.g. \\server\share\path\to\photos\) as this will NOT work for that, but a simple conditional statement can be written to catch and accomodate that.

C.
Logged

gummbah

  • World Citizen
  • ***
  • Posts: 240
Re: Sorting pictures like in picasa
« Reply #2 on: June 24, 2008, 07:46:44 am »

Create a new view scheme

Add 2 view items
  • [Year]
  • and a new expression called "Last Folder" (or whatever you want)
The "Last Folder" expression item should contain the following ...
Code: [Select]
ListItem([Filename (path)],ListCount(RemoveLeft([FileName (path)],3),\),\)
What this does is (working from the inside out)
1) removes the volume from the filepath i.e. "z:\Photos\Folder1\Description" yields "Photos\Folder1\Description" - we need to do this as listitem(listcount) returns the nth as opposed to the (n-1)th item in the list count (see next)
2) counts how many "list items" (i.e. folders) are left in the path. (it looks for items delimited by the "\" character)
3) returns the last of the items (the last folder) in the file path

It's kinda clunky as we can't use arithmetic to do listcount-1 (at least not that I know of). You'll also want to be careful with UNC based paths (e.g. \\server\share\path\to\photos\) as this will NOT work for that, but a simple conditional statement can be written to catch and accomodate that.

C.

Thanks! That's almost what I was looking for.
What is still different is that Picasa sorts the folders chronologically instead by name.
Is there anyway to accomplish that as well?

Cheers
Logged

ThoBar

  • Citizen of the Universe
  • *****
  • Posts: 992
  • Was confishy
Re: Sorting pictures like in picasa
« Reply #3 on: June 24, 2008, 08:07:57 am »

hmm, I cant try right now, but it might be possible using the sort field in the Edit View Scheme window I think.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Sorting pictures like in picasa
« Reply #4 on: June 24, 2008, 09:10:59 am »

What is still different is that Picasa sorts the folders chronologically instead by
The problem here is MC has no concept of folders, all it has are files and their attributes.

The only attribute that might work is to sort by  [Date Created]

A better solution might be to prefix your folders by numeric dates

instead of Jan 2007 use 01_2007 (say)
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42028
  • Shoes gone again!
Re: Sorting pictures like in picasa
« Reply #5 on: June 24, 2008, 09:22:29 am »

The problem here is MC has no concept of folders, all it has are files and their attributes.

The only attribute that might work is to sort by  [Date Created]

A better solution might be to prefix your folders by numeric dates

instead of Jan 2007 use 01_2007 (say)

I always name my image and video folders like:

2008-06-24 [Optional Album Description Here]

That way, they sort by date in all programs.
Logged
Matt Ashland, JRiver Media Center

zirum

  • Galactic Citizen
  • ****
  • Posts: 403
  • still learning.
Re: Sorting pictures like in picasa
« Reply #6 on: June 25, 2008, 10:07:03 am »

Is it possible to do a group by([]) and on that use min(), avg(), max(), total count()?
Logged
Note to myself: Read, think, write - Read, think, write - think, read, write - think, write, read - think, write, read... Aahhw, i always mess that up...
Pages: [1]   Go Up