mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-08-09 13:59:50 +00:00
Dynamically build the type list for the help message.
This commit is contained in:
parent
980190cd44
commit
20ebc10b0c
2 changed files with 26 additions and 2 deletions
14
README.md
14
README.md
|
@ -65,5 +65,17 @@ List all duplicate files belonging to different sets:
|
||||||
on t.hash = files.hash
|
on t.hash = files.hash
|
||||||
group by files.hash, group_id, t.ct order by 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.
|
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
|
||||||
|
|
|
@ -51,6 +51,18 @@ namespace din {
|
||||||
} //unnamed namespace
|
} //unnamed namespace
|
||||||
|
|
||||||
bool parse_commandline (int parArgc, char* parArgv[], po::variables_map& parVarMap) {
|
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");
|
po::options_description desc("General");
|
||||||
desc.add_options()
|
desc.add_options()
|
||||||
("help,h", "Produces this help message")
|
("help,h", "Produces this help message")
|
||||||
|
@ -63,7 +75,7 @@ namespace din {
|
||||||
po::options_description set_options("Set options");
|
po::options_description set_options("Set options");
|
||||||
set_options.add_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.")
|
("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");
|
po::options_description positional_options("Positional options");
|
||||||
positional_options.add_options()
|
positional_options.add_options()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue