Permlink Replies: 10 - Pages: 1 - Last Post: 03-Apr-2008 21:42 Last Post By: fromchair9 Threads: [ Previous | Next ]
jimberry

Posts: 7,447
Registered: 08/30/04
Making a multi-skin album in one pass
Posted: 26-Jul-2006 16:08
  Click to reply to this thread Reply
Some posters have asked for the ability to create multiple galleries with different skins as an option in JAlbum, but it is actually quite easy to do that with a batch file like this example

@echo off
echo Hello this is a test batch file
pause
java -Xmx400M -jar "E:\Program Files\JAlbum\JAlbum.jar" -projectFile simple.jap -appendImages
pause
java -Xmx400M -jar "E:\Program Files\JAlbum\JAlbum.jar" -projectFile bpp.jap -appendImages
pause
java -Xmx400M -jar "E:\Program Files\JAlbum\JAlbum.jar" -projectFile bppgrantham.jap
pause
java -Xmx400M -jar "E:\Program Files\JAlbum\JAlbum.jar" -projectFile gallery.jap -appendImages
pause

If anyone is interested, there is some discussion on this at http://jalbum.net/forum/thread.jspa?threadID=9766&start=0&tstart=0

<<<<Added 28/12/2006>>>>>>
See http://jalbum.net/consolemode.jsp for a list of allowed parameters and their defaults

Message was edited by:
jimberry

For skin-specific parameters, see David's advice in this thread
http://jalbum.net/forum/thread.jspa?threadID=12593&tstart=0

Message was edited by: jimberry

MarkE

Posts: 4,568
Registered: 04/24/06
Re: Making a multi-skin album in one pass
Posted: 27-Jul-2006 09:04   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
This is a Top Tip :D
MarkE

Posts: 4,568
Registered: 04/24/06
Re: Making a multi-skin album in one pass
Posted: 07-Oct-2006 01:23   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
The batch approach can also be used in this example : I use Chameleon with a Panoramics album, which consists of 6 (and growing) folders. Originally, I used 6 separate jap files and one Index jap, and ran them individually or all together using a batch file. The 6 japs use different Chameleon styles, and the index has a few more changes.

The problem is this : the Chameleon skin is very much a live project, and is updated often (for which I am very grateful :D ). To keep my album fully up to date means much editing of these 7 jap files, double checking that the right settings are being used etc.

So, for an album like this which has small variations in parameters, I created a "base" jap file and used the command line parameters to make the necessary adjustments. This means that I have only one jap file (and one batch file) to maintain, which should help reduce the work load in the future.

Simple but effective. See http://mworthington.cabspace.com/jalbum/panoramics

The batch file is :

@ECHO OFF
CLS
ECHO.
ECHO.
ECHO.
ECHO Automatically Process Sub-Projects
ECHO ==================================
ECHO.
REM Use "-appendImages" for "Make Album", leave it out for "Rebuild All".
REM
REM See C:\Program Files\JAlbum\help\consolemode.html
ECHO.
ECHO Do you want to do this?
ECHO.
ECHO Control-C to abort
ECHO.
PAUSE
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\England" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\England" -style BlackBlue.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\Home(s)" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\Home(s)" -style BlackRed.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\Malta" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\Malta" -style BlackGold.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\Others" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\Others" -style BlackTurquoise.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\Skiing" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\Skiing" -style BlackWorld.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics\The Great Outdoors" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics\The Great Outdoors" -style BlackJungle.css -appendImages
ECHO.
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "Panoramics.jap" -directory "D:\Mark's JAlbum\Input\Panoramics" -outputDirectory "D:\Mark's JAlbum\Output\Panoramics" -style Black.css -appendImages -subdirs false -thumbSize 120x120 -cols 5
ECHO.
ECHO.
ECHO Check Album ....
ECHO.
PAUSE
"D:\Mark's JAlbum\Output\Panoramics\index.html"

Mark

ps, for those who notice, some of the Chameleon styles are my modified ones ...
JeanPierre

Posts: 1,103
Registered: 10/10/06
Re: Making a multi-skin album in one pass
Posted: 27-Dec-2006 16:42   in response to: MarkE in response to: MarkE
  Click to reply to this thread Reply
Thank for these pieces of information that help me a lot. I am using this instruction
java -Xmx400M -jar "C:\Program Files\JAlbum\JAlbum.jar" -projectFile "FamilleOriginaux.jap" -appendImages
that should correspond to "Make Album" in the standard user interface. What is the instruction for "Rebuild all"?
JeanPierre

Posts: 1,103
Registered: 10/10/06
Re: Making a multi-skin album in one pass
Posted: 27-Dec-2006 23:05   in response to: JeanPierre in response to: JeanPierre
  Click to reply to this thread Reply
Ok, I solved my problem by removing the -appendImages.
jimberry

Posts: 7,447
Registered: 08/30/04
Re: Making a multi-skin album in one pass
Posted: 27-Dec-2006 23:07   in response to: JeanPierre in response to: JeanPierre
  Click to reply to this thread Reply
See http://jalbum.net/consolemode.jsp for a list of allowed parameters and their defaults

For skin-specific parameters, see David's advice in this thread
http://jalbum.net/forum/thread.jspa?threadID=12593&tstart=0

Message was edited by: jimberry
alan927

Posts: 2,654
Registered: 06/18/05
Re: Making a multi-skin album in one pass
Posted: 16-Apr-2007 01:53   in response to: jimberry in response to: jimberry
  Click to reply to this thread Reply
I'm just now writing my first .cmd file for JAlbum. It runs OK, but it's only using about 50% of CPU so it appears to be only running 1 thread. Any ideas on running 2 threads from command mode, or should I request a new parameter in the "Feature Requests" forum?
alan927

Posts: 2,654
Registered: 06/18/05
Re: Making a multi-skin album in one pass
Posted: 16-Apr-2007 01:56   in response to: alan927 in response to: alan927
  Click to reply to this thread Reply
BTW, you should always use an extension of .cmd instead of .bat when writing batch files in Windows2000 and higher. Using .bat invokes the 16-bit WOW (Windows on Windows) subsystem, while .cmd runs the file in native 32-bit mode (faster, less overhead due to no WOW subsystem launch).

Will you notice a difference? Probably not. But technically speaking it's more efficient. :0
jimberry

Posts: 7,447
Registered: 08/30/04
Re: Making a multi-skin album in one pass
Posted: 16-Apr-2007 03:56   in response to: alan927 in response to: alan927
  Click to reply to this thread Reply
Thanks for the tip, Alan. That's something I was not aware of.
MarkE

Posts: 4,568
Registered: 04/24/06
Re: Making a multi-skin album in one pass
Posted: 16-Apr-2007 09:17   in response to: alan927 in response to: alan927
  Click to reply to this thread Reply
BTW, you should always use an extension of .cmd
instead of .bat when writing batch files in
Windows2000 and higher. Using .bat invokes the
16-bit WOW (Windows on Windows) subsystem, while .cmd
runs the file in native 32-bit mode (faster, less
overhead due to no WOW subsystem launch).

Will you notice a difference? Probably not. But
technically speaking it's more efficient. :0


Good tip! I was unaware of this.

Mark
fromchair9

Posts: 18
Registered: 03/26/08
Re: Making a multi-skin album in one pass
Posted: 03-Apr-2008 21:42   in response to: alan927 in response to: alan927
  Click to reply to this thread Reply
Did you ever figure out how to enter 2 threads in a .cmd script?
Legend
Forum admins
Helpful Answer
Correct Answer

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