From 12ce4d27dc9563b9f4e7b4b25bd9dcad166ff112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sun, 10 Nov 2024 21:09:30 +0100 Subject: [PATCH 1/2] fix: Make all command option descriptions start with upper case Fixes #607 --- src/butler-sheet-icons.js | 56 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/src/butler-sheet-icons.js b/src/butler-sheet-icons.js index feec4d27..8d56b94d 100644 --- a/src/butler-sheet-icons.js +++ b/src/butler-sheet-icons.js @@ -64,7 +64,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -99,39 +99,39 @@ const program = new Command(); .requiredOption('--prefix ', 'Qlik Sense virtual proxy prefix', '') .requiredOption( '--secure ', - 'connection to Qlik Sense engine is via https', + 'Connection to Qlik Sense engine is via https', true ) .requiredOption( '--apiuserdir ', - 'user directory for user to connect with when using Sense APIs' + 'User directory for user to connect with when using Sense APIs' ) .requiredOption( '--apiuserid ', - 'user ID for user to connect with when using Sense APIs' + 'User ID for user to connect with when using Sense APIs' ) .requiredOption( '--logonuserdir ', - 'user directory for user to connect with when logging into web UI' + 'User directory for user to connect with when logging into web UI' ) .requiredOption( '--logonuserid ', - 'user ID for user to connect with when logging into web UI' + 'User ID for user to connect with when logging into web UI' ) .requiredOption('--logonpwd ', 'password for user to connect with') .requiredOption( '--headless ', - 'headless (=not visible) browser (true, false)', + 'Headless (=not visible) browser (true, false)', true ) .requiredOption( '--pagewait ', - 'number of seconds to wait after moving to a new sheet. Set this high enough so the sheet has time to render properly', + 'Number of seconds to wait after moving to a new sheet. Set this high enough so the sheet has time to render properly', 5 ) .requiredOption( '--imagedir ', - 'directory in which thumbnail images will be stored. Relative or absolute path', + 'Directory in which thumbnail images will be stored. Relative or absolute path', './img' ) .requiredOption( @@ -141,7 +141,7 @@ const program = new Command(); ) .requiredOption( '--includesheetpart ', - 'which part of sheets should be used to take screenshots. 1=object area only, 2=1 + sheet title, 3=2 + selection bar, 4=3 + menu bar', + 'Which part of sheets should be used to take screenshots. 1=object area only, 2=1 + sheet title, 3=2 + selection bar, 4=3 + menu bar', '1' ) .option( @@ -244,7 +244,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -279,16 +279,16 @@ const program = new Command(); .requiredOption('--prefix ', 'Qlik Sense virtual proxy prefix', '') .requiredOption( '--secure ', - 'connection to Qlik Sense engine is via https', + 'Connection to Qlik Sense engine is via https', true ) .requiredOption( '--apiuserdir ', - 'user directory for user to connect with when using Sense APIs' + 'User directory for user to connect with when using Sense APIs' ) .requiredOption( '--apiuserid ', - 'user ID for user to connect with when using Sense APIs' + 'User ID for user to connect with when using Sense APIs' ) .option( '--qliksensetag ', @@ -337,7 +337,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -353,34 +353,34 @@ const program = new Command(); .requiredOption('--apikey ', 'API key used to access the Sense APIs') .requiredOption( '--skip-login', - 'skip QS login page, go directly to the tenant URL. Use this if you are automatically logged in to Qlik Sense', + 'Skip QS login page, go directly to the tenant URL. Use this if you are automatically logged in to Qlik Sense', false ) .requiredOption( '--logonuserid ', - 'user ID for user to connect with when logging into web UI' + 'User ID for user to connect with when logging into web UI' ) .requiredOption('--logonpwd ', 'password for user to connect with') .requiredOption( '--headless ', - 'headless (=not visible) browser (true, false)', + 'Headless (=not visible) browser (true, false)', true ) .requiredOption( '--pagewait ', - 'number of seconds to wait after moving to a new sheet. Set this high enough so the sheet has time to render properly', + 'Number of seconds to wait after moving to a new sheet. Set this high enough so the sheet has time to render properly', 5 ) .requiredOption( '--imagedir ', - 'directory in which thumbnail images will be stored. Relative or absolute path', + 'Directory in which thumbnail images will be stored. Relative or absolute path', './img' ) .addOption( new Option( '--includesheetpart ', - 'which part of sheets should be used to take screenshots. 1=object area only, 2=1 + sheet title, 3 not used, 4=full screen', + 'Which part of sheets should be used to take screenshots. 1=object area only, 2=1 + sheet title, 3 not used, 4=full screen', ) .choices(['1', '2', '4']) .default('1') @@ -464,7 +464,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -502,7 +502,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -556,7 +556,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ); @@ -585,7 +585,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -623,7 +623,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ); @@ -675,7 +675,7 @@ const program = new Command(); } }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) @@ -720,7 +720,7 @@ const program = new Command(); }) .addOption( - new Option('--loglevel, --log-level ', 'log level') + new Option('--loglevel, --log-level ', 'Log level') .choices(['error', 'warn', 'info', 'verbose', 'debug', 'silly']) .default('info') ) From 189b81f096c97fe7077e4798cd7c9d82cb31809d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=B6ran=20Sander?= Date: Sun, 10 Nov 2024 21:16:35 +0100 Subject: [PATCH 2/2] fix: Make order in which command options appear more consistent across all commands. --- src/butler-sheet-icons.js | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/butler-sheet-icons.js b/src/butler-sheet-icons.js index 8d56b94d..23a40aca 100644 --- a/src/butler-sheet-icons.js +++ b/src/butler-sheet-icons.js @@ -86,6 +86,11 @@ const program = new Command(); 'Qlik Sense certificate file (exported from QMC)', './cert/client.pem' ) + .option( + '--qliksensetag ', + 'Used to control which Sense apps should have their sheets updated with new icons. All apps with this tag will be updated.', + '' + ) .requiredOption( '--certkeyfile ', 'Qlik Sense certificate key file (exported from QMC)', @@ -144,11 +149,6 @@ const program = new Command(); 'Which part of sheets should be used to take screenshots. 1=object area only, 2=1 + sheet title, 3=2 + selection bar, 4=3 + menu bar', '1' ) - .option( - '--qliksensetag ', - 'Used to control which Sense apps should have their sheets updated with new icons. All apps with this tag will be updated.', - '' - ) .addOption( new Option( '--exclude-sheet-status ', @@ -261,6 +261,11 @@ const program = new Command(); ) .requiredOption('--schemaversion ', 'Qlik Sense engine schema version', '12.612.0') .requiredOption('--appid ', 'Qlik Sense app whose sheet icons should be modified.', '') + .option( + '--qliksensetag ', + 'Used to control which Sense apps should have their sheets updated with new icons. All apps with this tag will be updated.', + '' + ) .requiredOption( '--certfile ', 'Qlik Sense certificate file (exported from QMC)', @@ -289,11 +294,6 @@ const program = new Command(); .requiredOption( '--apiuserid ', 'User ID for user to connect with when using Sense APIs' - ) - .option( - '--qliksensetag ', - 'Used to control which Sense apps should have their sheets updated with new icons. All apps with this tag will be updated.', - '' ); // ------------------ @@ -356,7 +356,6 @@ const program = new Command(); 'Skip QS login page, go directly to the tenant URL. Use this if you are automatically logged in to Qlik Sense', false ) - .requiredOption( '--logonuserid ', 'User ID for user to connect with when logging into web UI'