Accept `-` to mean stdin in command line code generator
diff --git a/gen/src/mod.rs b/gen/src/mod.rs
index f4d643d..9578fe8 100644
--- a/gen/src/mod.rs
+++ b/gen/src/mod.rs
@@ -80,7 +80,11 @@
 }
 
 fn read_to_string(path: &Path) -> Result<String> {
-    let bytes = fs::read(path)?;
+    let bytes = if path == Path::new("-") {
+        fs::read_stdin()
+    } else {
+        fs::read(path)
+    }?;
     match String::from_utf8(bytes) {
         Ok(string) => Ok(string),
         Err(err) => Err(Error::Utf8(path.to_owned(), err.utf8_error())),