Running jAlbum from the command line

Revision as of 16 December 2017 22:36 by RobM (Comments | Contribs)

The jAlbum application can also be controlled from the command line. It accepts the same parameters as you are able to set through the graphical user interface.

Issue java -jar JAlbum.jar -help in the same directory as the jAlbum application is installed in and jAlbum will list all allowed parameters. Select Tools->Open directories->"Program directory" to find the right directory.

Here is a list of the currently allowed parameters and their defaults:

 
-acceleratedScaling true
-accountProfileName 
-albumAddress 
-albumHeight 420
-albumWidth 560
-baseDirectory 
-chainDirectories false
-characterEncoding 
-classicReaders false
-closeupDirectory slides
-closeupPrefix 
-cols 6
-connected false
-copyOriginals true
-cpuCores 4
-creator 
-creditText credit8
-customImageOrdering 
-dateFormat 
-directoriesFirst true
-directory 
-displayVersion 15.1 (Currently installed version)
-excludeBacklinks false
-excludeByDefault false
-exifImageDescription false
-exifUserComment false
-fileNamer 
-forceJPEGWriting false
-ftpForceUTF8 false
-ftpPassword 
-ftpPort 21
-ftpServer 
-ftpUser 
-hiDPIImages false
-hiDPIThumbs false
-highQualityThumbs true
-highThumbnailCompressionQuality false
-hiResDirectory hi-res
-homepageAddress 
-homepageLinkText 
-ignorePattern \..*
-imageBackgroundColor #ffffff
-imageLinking LinkScaled
-imageOrdering OrderByDate
-imageSize 640x480
-includeDirectories true
-includeHiResImages true
-includePattern 
-indexPageName index
-internalVersion 15.1b1
-iptcCaption true
-jpegComment false
-keepMetaData false
-keepXmpData true
-makeThumbs true
-mediaRSS true
-metaData true
-myjalbum false
-outputDirectory album
-overrideExistingCopyright false
-pageExtension .html
-pageNamer 
-passiveMode true
-programDirectory /Applications/jAlbum.app/Contents/Java or for Windows C:\Dev\Java\jAlbum
-progressiveMode false
-projectFile 
-protocol ftp
-qualityPercent 85
-readXmp true
-remoteDirectory album
-remoteFS info.cqs.remotefs.RemoteFSBean@15975490
-resourceDirectory res
-reverseOrder false
-rights 
-rightsURL 
-rows 4
-runTool 
-scalingMethod ScaleSmooth
-searchEngineFriendlyNames false
-sharpenPercent 25
-skin Tiger
-skinsDirectory /Applications/jAlbum.app/Contents/Java/skins or for Windows  C:\Dev\Java\jAlbum\skins
-slideDirectory slides
-slides true
-smartUpload 
-smoothScalingType STANDARD
-style Linen.css
-subdirs true
-superimposeFilmIcon true
-suppressIEWarnings true
-textEncoding UTF-8
-textFileComment true
-themeImageProcessor 
-thumbnailDirectory thumbs
-thumbnailPrefix 
-thumbSize 124x124
-titleSource IPTCObjectName
-updatedDirsOnly false
-uploadAll 
-urlEncode true
-useCustomVideoSettings false
-user.<your variable> <value>
-useThumbForFolderIcon true
-videoParameters -y=,-i=$inputPath,-vf=hqdn3d\=1.5:1.5:6:6\,scale\=min(iw\\\,trunc(iw*min($videoWidth/iw\\\,$videoHeight/ih)*0.5)*2):min(ih\\\,trunc(ih*min($videoWidth/iw\\\,$videoHeight/ih)*0.5)*2)\,unsharp\=3:3:1.0:3:3:0.0\,$normalizeOrientation,-ss=$clipStart,-t=$clipLength,-threads=0,-b:a=96k,-ac=2,-ar=44100,-vcodec=libx264,-crf=$videoQuality,-metadata:s:v:0=rotate\=0,-movflags=faststart,-pix_fmt=yuv420p,$outputPath=
-videoQuality 50
-videoResolution p480
-visibleOnProfilePage true
-webPassword 
-webSafeNames true
-widgetInjection true
-writeUTF8 true

Required arguments are -directory and (-outputDirectory or -sameDirectory).

User defined variables are passed as -user.yourVariable "Value". Similar applies to skin defined variables (having a -skin. prefix). Command line mode is great for automated album generation and updates. Webmasters can make scripts that call the jAlbum application regularly to update server albums etc.

Variables and their parameters are case sensitive, so remember to write -projectFile, not -projectfile or -ProjectFile for instance.

Examples

Here is an example that updates an album out of files in D:\Nature and grabs other settings from the nature.jap project file:

java -Xmx400M -jar JAlbum.jar -directory D:\Nature -sameDirectory -projectFile nature.jap -appendImages

(The -Xmx400M flag allows jAlbum to grab up to 400MB of RAM if needed. The default of 64MB is not enough)

Here's another example that uploads the same project to a web server (v6):

 
java -jar JAlbum.jar -directory D:\Nature -sameDirectory -projectFile nature.jap -smartUpload

Here is an example that makes jAlbum enter "server mode" by running the "Server mode" Tool. When in "server mode", jAlbum monitors changes under the image directory. As soon as a change is detected (new image added for instance) a "Make album" operation is triggered. jAlbum then resumes to monitor the image directory.

 
java -Xmx400M -jar JAlbum.jar -projectFile nature.jap -runTool "tools/Server mode.bsh"

Here is finally how to launch jAlbum in windowed mode from a command line and having it load an album project:

java -Xmx400M -jar JAlbum.jar jalbum-settings.jap"

Linux/UNIX users: To run jAlbum from the command line in a plain server system (with no access to the X windowing system) add the -Djava.awt.headless=true command line switch.