arguments
This commit is contained in:
parent
959f71d0ea
commit
5d2402979b
|
@ -1554,12 +1554,12 @@ function main () {
|
||||||
|
|
||||||
argv
|
argv
|
||||||
.version( packageInfo.version )
|
.version( packageInfo.version )
|
||||||
|
.arguments( '<source-directory> [zim-file...]' )
|
||||||
.description( `Pack a directory into a zim file
|
.description( `Pack a directory into a zim file
|
||||||
|
|
||||||
Where:
|
Where:
|
||||||
source-directory \t path to the directory with HTML pages to pack into a ZIM file
|
source-directory \t path to the directory with HTML pages to pack into a ZIM file
|
||||||
zim-file \t\t optional path for the output` )
|
zim-file \t\t optional path for the output` )
|
||||||
.arguments( '<source-directory> [zim-file...]' )
|
|
||||||
// Mandatory arguments:
|
// Mandatory arguments:
|
||||||
.option( '-w, --welcome <page>', 'path of default/main HTML page. The path must be relative to HTML_DIRECTORY', 'index.htm' )
|
.option( '-w, --welcome <page>', 'path of default/main HTML page. The path must be relative to HTML_DIRECTORY', 'index.htm' )
|
||||||
.option( '-f, --favicon <file>', 'path of ZIM file favicon. The path must be relative to HTML_DIRECTORY and the image a 48x48 PNG', 'favicon.png' )
|
.option( '-f, --favicon <file>', 'path of ZIM file favicon. The path must be relative to HTML_DIRECTORY and the image a 48x48 PNG', 'favicon.png' )
|
||||||
|
@ -1579,14 +1579,11 @@ function main () {
|
||||||
// Extra arguments:
|
// Extra arguments:
|
||||||
.option( '--optimg', 'optimise images' )
|
.option( '--optimg', 'optimise images' )
|
||||||
.option( '--jpegquality <factor>', 'JPEG quality', parseInt, 60 )
|
.option( '--jpegquality <factor>', 'JPEG quality', parseInt, 60 )
|
||||||
.on( '--help', () => {
|
|
||||||
console.log( '' )
|
|
||||||
})
|
|
||||||
.parse( process.argv )
|
.parse( process.argv )
|
||||||
|
|
||||||
log( argv )
|
log( argv )
|
||||||
|
|
||||||
var args = argv.args
|
const args = argv.args
|
||||||
|
|
||||||
while ( args[ 0 ] == '' ) // if mwoffliner prepends with empty extra parameter(s)
|
while ( args[ 0 ] == '' ) // if mwoffliner prepends with empty extra parameter(s)
|
||||||
args.shift()
|
args.shift()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user