// This script reads README-template.md and generates the playground links // from the Rust source files in the various directories. // To add a new exercise, add it to the appropriate place in README-template.md // and then make sure to recompile this script (because the template gets // included at compile time and then run it to generate a new version of // README.md. use std::fs::File; use std::io::prelude::*; fn main() { let template = include_str!("../../README-template.md"); let mut generated_readme = File::create("README.md").unwrap(); write!(generated_readme, "\ ").unwrap(); write!(generated_readme, "{}", template).unwrap(); }