1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-02-17 11:45:50 +00:00

Dynamically build the type list for the help message.

This commit is contained in:
King_DuckZ 2015-12-04 19:32:57 +00:00
parent 980190cd44
commit 20ebc10b0c
2 changed files with 26 additions and 2 deletions

View file

@ -65,5 +65,17 @@ List all duplicate files belonging to different sets:
on t.hash = files.hash
group by files.hash, group_id, t.ct order by files.hash;
#### Set number ####
### Set number ###
In the sets table you can find a disk_number column that is currently not used. This is in case you have numbered discs, so you are free to put any number you like in that column.
### Disc type ###
For your convenience, you can store the type of the disc you are going to index. Currently this has no impact on the program's behaviour. Available types are:
* **C** - CD-Rom
* **D** - Directory
* **V** - DVD
* **B** - BluRay
* **F** - Floppy Disk
* **H** - Hard Disk
* **Z** - Iomega Zip
* **O** - Other

View file

@ -51,6 +51,18 @@ namespace din {
} //unnamed namespace
bool parse_commandline (int parArgc, char* parArgv[], po::variables_map& parVarMap) {
std::string type_param_help;
{
std::ostringstream oss;
oss << "Default set type. Valid values are ";
oss << g_allowed_types[0];
for (std::size_t z = 1; z < lengthof(g_allowed_types); ++z) {
oss << ", " << g_allowed_types[z];
}
oss << '.';
type_param_help = oss.str();
}
po::options_description desc("General");
desc.add_options()
("help,h", "Produces this help message")
@ -63,7 +75,7 @@ namespace din {
po::options_description set_options("Set options");
set_options.add_options()
("setname,n", po::value<std::string>()->default_value("New set"), "Name to be given to the new set being scanned.")
("type,t", po::value<char>()->default_value('V'), "Default set type. Valid values are B, D, F, H, O, V, Z.")
("type,t", po::value<char>()->default_value('V'), type_param_help.c_str())
;
po::options_description positional_options("Positional options");
positional_options.add_options()