LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-12-2014, 12:28 AM   #1
carolus
Member
 
Registered: Feb 2008
Posts: 45

Rep: Reputation: 15
sort photos manually then list sorted filenames to text file


Is there some photo viewer or other tool to sort photos manually and then save the sorted filename list to a text file (for use in a script)?

I formerly used Picasa, which saved the sort order in a fairly transparent .pal file, but Google now hides this information somewhere I can't find.
 
Old 03-12-2014, 02:40 AM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,663

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
in the folder you can run something like
Code:
ls > list.txt
but the order in a folder will be the system default
and not a "list" of a album

sorted as how ?
1.png
2.png
3.png
or what
 
Old 03-12-2014, 10:12 AM   #3
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
sorted as how ?
I want a list of filenames in the order that I have manually selected. I will then use that list in a script to rename those files, prepending an index, so that subsequent alphanumeric sorting will use the order that I have manually selected.

I need a viewer to see what I am doing for the manual sort, then some way to get the result into a text file. Prepending the index number to the old filename preserves whatever information was in the old filename. I do this with audio files, but for those, the filename alone identifies the file. Photos require the help of some kind of viewer.
 
Old 03-12-2014, 10:26 AM   #4
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Quote:
Originally Posted by John VV View Post
in the folder you can run something like
Code:
ls > list.txt
but the order in a folder will be the system default
and not a "list" of a album

sorted as how ?
1.png
2.png
3.png
or what
i think it should be
Code:
ls -1 > list.txt
for a single column list.
 
Old 03-12-2014, 10:36 AM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Quote:
Originally Posted by carolus View Post
I want a list of filenames in the order that I have manually selected. I will then use that list in a script to rename those files, prepending an index, so that subsequent alphanumeric sorting will use the order that I have manually selected.

I need a viewer to see what I am doing for the manual sort, then some way to get the result into a text file. Prepending the index number to the old filename preserves whatever information was in the old filename. I do this with audio files, but for those, the filename alone identifies the file. Photos require the help of some kind of viewer.
you may want to check out nautilus scripts (i see one for dumping exif data on the g-scripts site); particularly the NAUTILUS_SCRIPT_SELECTED_FILE_PATHS variable.
 
Old 03-12-2014, 12:01 PM   #6
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by schneidz View Post
you may want to check out nautilus scripts (i see one for dumping exif data on the g-scripts site); particularly the NAUTILUS_SCRIPT_SELECTED_FILE_PATHS variable.
But I want to export the sort order that I have manually selected using the viewer, not anything in the original file. The viewer must be able to sort (like Picasa), and then able to export the manually selected sort order (like Picasa used to do in .pal files).
 
Old 03-12-2014, 12:02 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
$ ls | tee list.txt

Will give you a list of files in a file that you can sort manually. Cut and paste style.

You can perma-sort it by renaming the files in a naming convention that sorts by ascii values. By prefixing timestamp information in front of the files for example.

$ date +"%Y%m%d%H%M%S%N"
 
Old 03-12-2014, 12:44 PM   #8
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
Quote:
Originally Posted by carolus View Post
But I want to export the sort order that I have manually selected using the viewer, not anything in the original file. The viewer must be able to sort (like Picasa), and then able to export the manually selected sort order (like Picasa used to do in .pal files).
couldnt nautilus be used as some kind of viewer ? if you were to create a nautilus script (or expand on the meta-exif-dump script) couldnt you export the list of files in NAUTILUS_SCRIPT_SELECTED_FILE_PATHS in sorted order ?

mite be more complicated than you need (not sure about your environment); but just a suggestion.
 
Old 03-12-2014, 02:05 PM   #9
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Shadow_7 View Post
$ ls | tee list.txt

Will give you a list of files in a file that you can sort manually. Cut and paste style.

You can perma-sort it by renaming the files in a naming convention that sorts by ascii values. By prefixing timestamp information in front of the files for example.

$ date +"%Y%m%d%H%M%S%N"
That's what I'm doing now: sorting in Picasa where I can see what I'm doing, then tediously making a matching file list by hand.
Before version 3 of Picasa I could simply extract the file list from Picasa's .pal file.

There are lots of other file viewers and editors available, and I'm hoping one will let me do what I was doing with the old Picasa.
If the viewer allows manual sorting, it has to store the sequence somewhere, and I just want to export it to a text file.
 
Old 03-12-2014, 03:08 PM   #10
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,663

Rep: Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657Reputation: 2657
picassa ( well G+ photo) is a online album
you will need to use the tools on your g+ page
 
Old 03-12-2014, 03:27 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875Reputation: 875
mirage is decent for viewing images in a directory. Shows gif images as well. Not exactly featureful or fast if the images are huge, but a nice way to see what you're looking at, literally.
 
Old 03-12-2014, 04:23 PM   #12
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by John VV View Post
picassa ( well G+ photo) is a online album
you will need to use the tools on your g+ page
I use the offline version. I like to keep my data on my own hardware and in a nonproprietary format.
 
Old 03-13-2014, 12:43 AM   #13
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Irfanview has the desired capability and runs under Wine. (Under heading "File", choose "save selected filenames as TXT"). But is there no native Linux photo viewer or editor that can do this?

Last edited by carolus; 03-13-2014 at 12:53 AM. Reason: clarification
 
Old 03-13-2014, 09:28 AM   #14
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,326

Rep: Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920Reputation: 920
i was able to do this in gthumb.

clik on view -> sort -> sort by date/name/size ...

highlight the files you are interested in. rite-clik -> copy and paste in a text file.
 
Old 03-13-2014, 10:39 AM   #15
carolus
Member
 
Registered: Feb 2008
Posts: 45

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by schneidz View Post
i was able to do this in gthumb.

clik on view -> sort -> sort by date/name/size ...

highlight the files you are interested in. rite-clik -> copy and paste in a text file.
But these photos come from a scanner, not a camera, so it is useless to sort by date/name/size. I found the following about gthumb:

http://sourcepole.com/manually-sort-images

Quote:
you first need to create a “catalog” and within the catalog a “library” which will finally allow you to manually sort your images. All of which is not documented.

Once you’ve sorted your images, you’d possibly want to export the sorting? Again, no trace of any help or documentation: gthumb catalogs are saved under $HOME/.local/share/gthumb/catalogs/foobar.catalog.
So maybe gthumb is hackable to do this, or maybe the feature is now supported. I would welcome more information.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sort text file calexander Linux - Newbie 4 05-15-2010 01:57 PM
Get a list of delimited filenames from a text file (sed?) Ksearch Linux - Newbie 14 06-30-2009 05:51 PM
how to pick random file name from a list of filenames in a text file. pdklinux79 Linux - Newbie 9 06-20-2008 03:46 PM
select the longest string of each unique path in a sorted text file powah Programming 5 03-01-2007 12:16 PM
Filenames are sorted in wrong order Simoncifer Linux - Newbie 4 01-07-2005 01:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration