We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 381a4bd commit 85e6967Copy full SHA for 85e6967
scraper/src/main.rs
@@ -66,6 +66,7 @@ fn main() {
66
opts.optflag("t", "text", "output text of elements");
67
opts.optflag("h", "help", "this cruft");
68
opts.optopt("", "install-man-page", "install real documentation", "PATH");
69
+ opts.optflag("", "version", "output version number");
70
71
let args: Vec<String> = env::args().collect();
72
let matches = match opts.parse(&args[1..]) {
@@ -79,6 +80,10 @@ fn main() {
79
80
);
81
return;
82
}
83
+ if matches.opt_present("version") {
84
+ println!("{} {}", env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
85
+ return;
86
+ }
87
88
if let Some(path) = matches.opt_str("install-man-page") {
89
let mut path = PathBuf::from(path);
0 commit comments