1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310
|
/* Copyright (c) MediaArea.net SARL. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the License.html file in the root of the source tree.
*/
//---------------------------------------------------------------------------
#ifdef __BORLANDC__
#pragma hdrstop
#endif
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
#include "Help.h"
#include "Config.h"
#include "Common/Version.h"
//---------------------------------------------------------------------------
//***************************************************************************
//
//***************************************************************************
//---------------------------------------------------------------------------
int Help()
{
Version();
Help_Usage();
TEXTOUT("");
TEXTOUT("Options:");
TEXTOUT("Help:");
TEXTOUT(" --Help, -h");
TEXTOUT(" Display this help and exit");
TEXTOUT(" --Help=Advanced, -ha");
TEXTOUT(" Display the advanced help and exit");
TEXTOUT(" --Version, -v");
TEXTOUT(" Display the version and exit");
TEXTOUT("");
TEXTOUT(" --User=UserID, -u UserID");
TEXTOUT(" CLI user will be UserID");
TEXTOUT("");
TEXTOUT("Configuration Element:");
TEXTOUT(" --Configuration=ConfigurationFile, -c ConfigurationFile");
TEXTOUT(" Use ConfigurationFile as configuration file");
TEXTOUT(" Default, it uses the one in the user data application file");
TEXTOUT(" --PluginsConfiguration=PluginsConfigurationFile, -pc PluginsConfigurationFile");
TEXTOUT(" Use PluginsConfigurationFile as plugins configuration file");
TEXTOUT(" Default, it uses the struct in the configuration file or");
TEXTOUT(" no plugins configured if not inside.");
TEXTOUT("");
TEXTOUT("Reporting Elements:");
TEXTOUT(" --Mediaconch, -mc");
TEXTOUT(" Output MediaConch report (default)");
TEXTOUT(" (MediaConch contains default verbosity of implementationChecks");
TEXTOUT(" plus any provided policy checks.)");
TEXTOUT(" --Mediainfo, -mi");
TEXTOUT(" Output MediaInfo report");
TEXTOUT(" --Mediatrace, -mt");
TEXTOUT(" Output a trace of the file");
TEXTOUT("");
TEXTOUT("Policy Checker:");
TEXTOUT(" --Policy=PolicyFileName, -p PolicyFileName");
TEXTOUT(" Apply the policy (XSL or Schematron) ");
TEXTOUT(" --CreatePolicy");
TEXTOUT(" Create a policy (XSL) from a file");
TEXTOUT(" --PolicyReferenceFile=VideoFile, -prf VideoFile");
TEXTOUT(" Use the VideoFile as reference to compare in policy");
TEXTOUT(" --policyVerbosity=V, -pv V");
TEXTOUT(" Select verbosity (V) of the policy check, default 0");
TEXTOUT(" >= 1, show actual value also for passing rules");
TEXTOUT("");
TEXTOUT("Output Formats:");
TEXTOUT(" --Format=text, -ft");
TEXTOUT(" Output MediaConch reports in Text format");
TEXTOUT(" --Format=xml, -fx");
TEXTOUT(" Output MediaConch reports in XML format");
TEXTOUT(" (changed to -fa if there are more than 1 tool or more than 1 file)");
TEXTOUT(" --Format=html, -fh");
TEXTOUT(" Output MediaConch reports in HTML format");
TEXTOUT(" --Format=json, -fj");
TEXTOUT(" Output MediaConch reports in JSON format");
TEXTOUT(" --Format=simple, -fs");
TEXTOUT(" Output MediaConch reports in a shorten form");
TEXTOUT(" (>1 line only if there are errors), default format");
TEXTOUT(" --Format=csv, -fc");
TEXTOUT(" Output MediaConch reports in CSV format (only for policies)");
TEXTOUT(" --Format=maxml, -fa");
TEXTOUT(" Output in MediaArea XML format");
TEXTOUT(" --Display=DisplayFileName, -d DisplayFileName");
TEXTOUT(" Apply the display transformation (XSL)");
TEXTOUT("");
TEXTOUT("Output File:");
TEXTOUT(" --Output=file, -o file");
TEXTOUT(" Output MediaConch reports in file, trying to autodetect");
TEXTOUT(" the format from the extension or using the given display");
TEXTOUT(" Output-Text=file, -ot file");
TEXTOUT(" Output MediaConch reports in file in Text format");
TEXTOUT(" Output-Xml=file, -ox file");
TEXTOUT(" Output MediaConch reports in file in XML format");
TEXTOUT(" Output-Html=file, -oh file");
TEXTOUT(" Output MediaConch reports in file in HTML format");
TEXTOUT(" Output-Json=file, -oj file");
TEXTOUT(" Output MediaConch reports in file in JSON format");
TEXTOUT(" Output-Simple=file, -os file");
TEXTOUT(" Output MediaConch reports in file in a shorten form");
TEXTOUT(" (>1 line only if there are errors), default format");
TEXTOUT(" Output-Csv=file, -oc file");
TEXTOUT(" Output MediaConch reports in file in CSV format (only for policies)");
TEXTOUT(" Output-MaXml=file, -oa file");
TEXTOUT(" Output MediaConch reports in file in MediaArea XML format");
TEXTOUT("");
TEXTOUT(" --List");
TEXTOUT(" List files analyzed.");
TEXTOUT("");
TEXTOUT("Watch folder:");
TEXTOUT(" --WatchFolders-List, -wfl");
TEXTOUT(" List the folder watched");
TEXTOUT(" --WatchFolder=folder, -wf folder");
TEXTOUT(" Send to the server a folder to watch");
TEXTOUT(" --WatchFolder-Reports=folder, -wfr folder");
TEXTOUT(" Create reports of the selected watch folder to this folder");
TEXTOUT(" --WatchFolder-Not-Recursive");
TEXTOUT(" If watch folder is enabled, do not check recursively the folder");
TEXTOUT(" --WatchFolder-User=userId, -wfu userId");
TEXTOUT(" Create reports of the watch folder for the selected user ID");
TEXTOUT("");
TEXTOUT("Plugins:");
TEXTOUT(" --PluginsList");
TEXTOUT(" Output the plugins information ID");
TEXTOUT(" --UsePlugin=PluginId, -up PluginId");
TEXTOUT(" By default, only format plugin are used.");
TEXTOUT(" With this command, you can give the plugin ID you want to use.");
TEXTOUT(" Plugin ID can be get using the --pluginslist.");
TEXTOUT("");
TEXTOUT("File:");
TEXTOUT(" --FileInformation, -fi");
TEXTOUT(" Print files information and quit");
TEXTOUT(" --IncludeHidden");
TEXTOUT(" Include Hidden files when analysing a folder");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Help_Usage()
{
TEXTOUT("Usage: \"MediaConch [-Options...] FileName1 [Filename2...]\"");
return CLI_RETURN_ERROR;
}
//---------------------------------------------------------------------------
int Help_Nothing()
{
Help_Usage();
TEXTOUT("\"MediaConch --Help\" for displaying more information");
return CLI_RETURN_ERROR;
}
//---------------------------------------------------------------------------
int Help_Advanced()
{
TEXTOUT("--LogFile=...");
TEXTOUT(" Save the output in the specified file");
TEXTOUT("--Compression=Mode");
TEXTOUT(" Compress report in database using [Mode]");
TEXTOUT(" [Mode] can be None for no compression");
TEXTOUT(" [Mode] can be ZLib to use zlib");
TEXTOUT("-cz");
TEXTOUT(" Same as --Compression=ZLib");
TEXTOUT("");
TEXTOUT("Implementation Checker:");
TEXTOUT(" --ImplementationSchema=File");
TEXTOUT(" Use the specified File for implementation validation");
TEXTOUT(" --ImplementationVerbosity=V, -iv V");
TEXTOUT(" Select verbosity (V) of the implementation check, default 5");
TEXTOUT(" <= 4, show only fails and N/A");
TEXTOUT(" >= 5, show fails, N/A and pass");
TEXTOUT("");
TEXTOUT("--Force");
TEXTOUT(" Force to parse the file if registered in database");
TEXTOUT("--Full");
TEXTOUT(" Full MediaInfo report (needed by some policies)");
TEXTOUT("--NoMilAnalyze, -nmil");
TEXTOUT(" Do not analyze with MediaInfoLib");
TEXTOUT("--Async=yes, -as");
TEXTOUT(" Analyze asynchronously the files,");
TEXTOUT(" need to launch again the command to have the result");
TEXTOUT("--Https=0, --no-https");
TEXTOUT(" XML output contains links in HTTP instead of HTTPS");
TEXTOUT("--Help=Ssl");
TEXTOUT(" More details about SSL specific options (e.g. for HTTPS or FTPS)");
TEXTOUT("--Help=Ssh");
TEXTOUT(" More details about SSH specific options (e.g. for SFTP)");
TEXTOUT("");
TEXTOUT("--DefaultValuesForType=Type,Field");
TEXTOUT(" Give the default values for the field of the");
TEXTOUT(" type given (separated by comma)");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Help_Ssl()
{
TEXTOUT("--Ssl_CertificateFileName=...");
TEXTOUT(" File name of the SSL certificate.");
TEXTOUT(" The default format is \"PEM\" and can be changed");
TEXTOUT(" with --Ssl_CertificateFormat.");
TEXTOUT("--Ssl_CertificateFormat=...");
TEXTOUT(" File format of the SSL certificate.");
TEXTOUT(" Supported formats are \"PEM\" and \"DER\"");
TEXTOUT("--Ssl_PrivateKeyFileName=...");
TEXTOUT(" File name of the SSL private key.");
TEXTOUT(" The default format is \"PEM\" and can be changed");
TEXTOUT(" with --Ssl_PrivateKeyFormat.");
TEXTOUT(" Note: private key with a password is not supported.");
TEXTOUT("--Ssl_PrivateKeyFormat=...");
TEXTOUT(" File format of the SSL private key.");
TEXTOUT(" Supported formats are \"PEM\" and \"DER\"");
TEXTOUT("--Ssl_CertificateAuthorityFileName=...");
TEXTOUT(" File name of the SSL certificate authorities");
TEXTOUT(" to verify the peer with.");
TEXTOUT("--Ssl_CertificateAuthorityPath=...");
TEXTOUT(" Path of the SSL certificate authorities");
TEXTOUT(" to verify the peer with.");
TEXTOUT("--Ssl_CertificateRevocationListFileName=...");
TEXTOUT(" File name of the SSL certificate revocation list.");
TEXTOUT(" The format is \"PEM\"");
TEXTOUT("--Ssl_IgnoreSecurity=...");
TEXTOUT(" Does not verify the authenticity of the peer's certificate");
TEXTOUT(" Use it at your own risks");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Help_Ssh()
{
TEXTOUT("--Ssh_PublicKeyFileName=...");
TEXTOUT(" File name of the SSH private key.");
TEXTOUT(" Default is $HOME/.ssh/id_rsa.pub or $HOME/.ssh/id_dsa.pub");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"id_rsa.pub\" or \"id_dsa.pub\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT(" Note: you need to set both public and private key.");
TEXTOUT("--Ssh_PrivateKeyFileName=...");
TEXTOUT(" File name of the SSH private key.");
TEXTOUT(" Default is $HOME/.ssh/id_rsa or $HOME/.ssh/id_dsa");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"id_rsa\" or \"id_dsa\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT(" Note: you need to set both public and private key.");
TEXTOUT(" Note: private key with a password is not supported.");
TEXTOUT("--Ssh_KnownHostsFileName=...");
TEXTOUT(" File name of the known hosts");
TEXTOUT(" The format is the OpenSSH file format (libssh2)");
TEXTOUT(" Default is $HOME/.ssh/known_hosts");
TEXTOUT(" if the HOME environment variable is set, and just");
TEXTOUT(" \"known_hosts\" in the current directory");
TEXTOUT(" if HOME is not set.");
TEXTOUT("--Ssh_IgnoreSecurity");
TEXTOUT(" Does not verify the authenticity of the peer");
TEXTOUT(" (you don't need to accept the key with ssh first)");
TEXTOUT(" Use it at your own risks");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Help_Policy()
{
TEXTOUT("--Policy=... Specify a schema to validate");
TEXTOUT("Usage: \"MediaConch --Policy=FileName\"");
TEXTOUT("");
TEXTOUT("FileName is the Schematron file used to validate");
TEXTOUT("");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Help_Xslt()
{
TEXTOUT("--Xslt=... Specify a schema to validate");
TEXTOUT("Usage: \"MediaConch --Xslt=FileName\"");
TEXTOUT("");
TEXTOUT("FileName is the XSLT file used to validate");
TEXTOUT("");
return CLI_RETURN_FINISH;
}
//---------------------------------------------------------------------------
int Version()
{
TEXTOUT("MediaConch Command Line Interface " MEDIACONCH_VERSION);
return CLI_RETURN_FINISH;
}
|