@@ -21,11 +21,16 @@ register_counting_allocator!(GLOBAL_ALLOCATOR, enable = false);
2121// TODO: Check if all paths supplied using the cmd args are valid
2222// TODO: Clean up the parameter structs and conversions
2323
24+ static HELP_TEMPLATE : & str = "{before-help}{name} (v{version}) - {author-with-newline}{about-with-newline}\n {usage-heading} {usage}\n \n {all-args}{after-help}" ;
25+
2426#[ derive( Clone , Debug , clap:: Parser ) ]
2527#[ command(
2628 name = "splashsurf" ,
2729 author = "Fabian Löschner <loeschner@cs.rwth-aachen.de>" ,
28- about = "Surface reconstruction for particle data from SPH simulations (https://github.com/w1th0utnam3/splashsurf)"
30+ about = "Surface reconstruction for particle data from SPH simulations (https://github.com/w1th0utnam3/splashsurf)" ,
31+ version,
32+ propagate_version = true ,
33+ help_template = HELP_TEMPLATE ,
2934) ]
3035struct CommandlineArgs {
3136 /// Enable quiet mode (no output except for severe panic messages), overrides verbosity level
@@ -42,8 +47,10 @@ struct CommandlineArgs {
4247#[ derive( Clone , Debug , clap:: Parser ) ]
4348enum Subcommand {
4449 /// Reconstruct a surface from particle data
50+ #[ command( help_template = HELP_TEMPLATE ) ]
4551 Reconstruct ( reconstruction:: ReconstructSubcommandArgs ) ,
4652 /// Convert particle or mesh files between different file formats
53+ #[ command( help_template = HELP_TEMPLATE ) ]
4754 Convert ( convert:: ConvertSubcommandArgs ) ,
4855}
4956
0 commit comments