This question is not answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 15 - Pages: 2 [ 1 2 | Next ] - Last Post: 03-Nov-2016 20:49 Last Post By: AndreWolff Threads: [ Previous | Next ]
AndreWolff

Posts: 1,993
Registered: 12/14/07
A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 18:49
 
  Click to reply to this thread Reply
jAlbum is an excellent tool to to process all pictures in a root folder and its subdirectories with one project file.

However this has its limitations as I explained in my note How to process pictures in subdirectories in jAlbum with the Slide Show 4 skin.

So if I need more flexibility I use for each album another jAlbum project file as explained in my note. The project file of each album is saved in the image directory of the album.

The big disadvantage of this approach is that I have to open the project for each album and click the 'Make album' button. The example discussed in my note contains one top album and 12 albums in subdirectories, so I have to give by hand 13 open and make commands.

So my request is to add a batch processing function to jAlbum so that the project files in the top directory and its subdirectories are processed by one Make album command.
jGromit

Posts: 32,917
Registered: 01/31/06
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 19:22   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Attachment RebuildAll.cmd (1.1 KB)
Why not just set up a batch file that kicks off each project with a command line? That's what I do for my demo albums. Example attached - I put the pauses in there just so that if there's a problem, I can see where I am in the process.

If your project files are all in the same directory, you wouldn't even have to do the "cd" commands between projects.
MarkusD

Posts: 483
Registered: 04/13/06
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 20:16   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment MakeAll.zip (11.3 KB)
jGromit wrote:
Why not just set up a batch file that kicks off each project with a command line? That's what I do for my demo albums. Example attached - I put the pauses in there just so that if there's a problem, I can see where I am in the process.

If your project files are all in the same directory, you wouldn't even have to do the "cd" commands between projects.

I also wrote some batch files to do a make process of a lot of different albums. The main batch file "UpdateAll.cmd" and just as an example one album folder. See attached ZIP file.
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 23:13   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Why not just set up a batch file that kicks off each project with a command line?
Although I actually did ask to do this automatically in jAlbum, your batch file is doing the job perfectly.
I did edit your file and added the contents to my note.

jGromit, thanks again for your help!

I still think it is usefully to implement this method in jAlbum.
Creating such a tree is rather simple:
  • First maket he root album in the top directory.
  • Next copy the resulting project file JalbumSS4.jap to the first subdirectory, edit that file in jAlbum by adding the link to the root, edit the output directory, browse to the theme image, change the thumbnails size is useful etc. and make the first folder album.
  • Next copy that file to the 2nd folder and change at least the output directory and I make the album.
  • Do the same for the other folder albums.
  • Finally (hopefully in the future) run jAlbum again and make all albums followed by an upload.
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 23:15   in response to: MarkusD in response to: MarkusD
 
  Click to reply to this thread Reply
Thanks Markus for your help, your batch file is a little more complicated, but I am sure it can do the job.
jGromit

Posts: 32,917
Registered: 01/31/06
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 23:20   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
I still think it is usefully to implement this method in jAlbum.

I disagree. It adds a complication to the application to serve a need that's is almost vanishly small. I'd guess that 99.999% of users have each album project in a separate directory, with just one project file called jalbum-settings.jap. They're not trying to do anything fancy.

In fact, I find it difficult to understand your workflow. It seems wildly over-complicated.
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 13-Nov-2015 23:39   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
I disagree. It adds a complication to the application to serve a need that's is almost vanishly small. I'd guess that 99.999% of users have each album project in a separate directory, with just one project file called jalbum-settings.jap. They're not trying to do anything fancy.

In fact, I find it difficult to understand your workflow. It seems wildly over-complicated.

I have a very simple work-flow: I always put the jAlbum project file in the same directory as the images.
Each project which uses no folder albums is in a separate directory.
If I make a tree of albums with folder albums, the root directory contains the jAlbum project file and subdirectories contain the images of the folder albums with possible .inc files to specify theme images and/or music for the folder albums.

I don't use the My Albums folder in the documents directory at all, because I think that makes the wok-flow complicated!
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 14-Nov-2015 08:18   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
jGromit wrote:
Why not just set up a batch file that kicks off each project with a command line?
As I said already, your proposal works perfect.

This is a part of the modified batch file:
cd "D:\Users\Public\Pictures\Texel\TopWindow\0-Zuiden_W2010_09_04"
java -Xmx800M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile "JalbumSS4.jap" -appendImages
pause
cd "..\1-Geul_W2011_09_29"
java -Xmx800M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile "JalbumSS4.jap" -appendImages
pause 
This will make all the albums in the folders, but my additional question is:

What do I have to add to this code, so that it not only makes each album, but also upload each album with jAlbums integrated FTP program?
jimberry

Posts: 7,459
Registered: 08/30/04
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 14-Nov-2015 10:58   in response to: AndreWolff in response to: AndreWolff
Helpful
  Click to reply to this thread Reply
Look at the manual Running jAlbum from the command line where there is an example showing just that ;-)
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 14-Nov-2015 13:19   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
Look at the manual Running jAlbum from the command line where there is an example showing just that ;-)
I tried this:
cd "D:\Users\Public\Pictures\WandelNetwerk\Vecht_Stegeren"
java -Xmx800M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile SS4_FloatingDivs.jap -appendImages
pause
java -jar "C:\Program Files\jAlbum\JAlbum.jar" -sameDirectory -projectFile SS4_FloatingDivs.jap -smartUpload
pause
This seems to work so I guess it is the correct syntax!

Thanks for your help Jim!
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 01-Nov-2016 21:19   in response to: jimberry in response to: jimberry
 
  Click to reply to this thread Reply
jimberry wrote:
Look at the manual Running jAlbum from the command line where there is an example showing just that ;-)
I use now a batch file like:
echo Start Vechtdal (except Stegeren)batch file...
 
cd "D:\Users\Public\Pictures\WandelNetwerk\Vecht_Diffelen"
java -Xmx1600M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile JalbumSS4.jap -appendImages
java -jar "C:\Program Files\jAlbum\JAlbum.jar" -sameDirectory -projectFile JalbumSS4.jap -smartUpload
 
cd "D:\Users\Public\Pictures\Fietstochten\Fietstocht_Vilsteren"
java -Xmx1600M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile JalbumSS4.jap -appendImages
java -jar "C:\Program Files\jAlbum\JAlbum.jar" -sameDirectory -projectFile JalbumSS4.jap -smartUpload
This works fine, but if jAlbum generates an error, the batch continues, so the error message disappears.
Is there a way to stop the batch in case of an error?
davidekholm

Posts: 21,290
Registered: 10/18/02
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 03-Nov-2016 11:37   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
jimberry wrote:
Look at the manual Running jAlbum from the command line where there is an example showing just that ;-)
I use now a batch file like:
echo Start Vechtdal (except Stegeren)batch file...
 
cd "D:\Users\Public\Pictures\WandelNetwerk\Vecht_Diffelen"
java -Xmx1600M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile JalbumSS4.jap -appendImages
java -jar "C:\Program Files\jAlbum\JAlbum.jar" -sameDirectory -projectFile JalbumSS4.jap -smartUpload
 
cd "D:\Users\Public\Pictures\Fietstochten\Fietstocht_Vilsteren"
java -Xmx1600M -jar "C:\Program Files\jAlbum\JAlbum.jar" -projectFile JalbumSS4.jap -appendImages
java -jar "C:\Program Files\jAlbum\JAlbum.jar" -sameDirectory -projectFile JalbumSS4.jap -smartUpload
This works fine, but if jAlbum generates an error, the batch continues, so the error message disappears.
Is there a way to stop the batch in case of an error?

I see, well, it turns out that jAlbum returns a zero status code no matter if execution runs fine or not. Please try this patched jalbum-core.jar file , it should return different non-zero result codes if execution was halted due to some error. The exact error code varies depending on the type of error (simply the length of the class name of the error)

jGromit

Posts: 32,917
Registered: 01/31/06
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 03-Nov-2016 12:41   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
I always just put pause commands between each album build in the command line, so I could take a quick look and hit CTRL-C if something had gone wrong, or hit ENTER to continue to the next project. It wasn't as if I was turning it loose on an hour's worth of album builds and walking away, so that was quite workable.
AndreWolff

Posts: 1,993
Registered: 12/14/07
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 03-Nov-2016 15:52   in response to: davidekholm in response to: davidekholm
 
  Click to reply to this thread Reply
Attachment BatchError.PNG (38.7 KB)
davidekholm wrote:
I see, well, it turns out that jAlbum returns a zero status code no matter if execution runs fine or not. Please try this patched jalbum-core.jar file , it should return different non-zero result codes if execution was halted due to some error. The exact error code varies depending on the type of error (simply the length of the class name of the error)
Well I tried it with a batch files which contains a wrong project name. I see a java.io.FileNotFoundException, but the batch file does not stop and continues with the next statement, see screenshot.
Should I insert a special command to investigate that status code and if what is that statement?
davidekholm

Posts: 21,290
Registered: 10/18/02
Re: A 'Make album' for all projects in the root album and its subdirectories
Posted: 03-Nov-2016 16:10   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums