|
|
|
@ -1,6 +1,6 @@
|
|
|
|
use std::fs;
|
|
|
|
use std::fs;
|
|
|
|
use serde_json::Value;
|
|
|
|
use serde_json::Value;
|
|
|
|
//use std::io::Write;
|
|
|
|
use std::io::Write;
|
|
|
|
|
|
|
|
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
|
|
fn main() -> std::io::Result<()> {
|
|
|
|
let json_string = fs::read_to_string("boards/coding.json")?;
|
|
|
|
let json_string = fs::read_to_string("boards/coding.json")?;
|
|
|
|
@ -21,9 +21,9 @@ fn main() -> std::io::Result<()> {
|
|
|
|
if card["idList"] == list["id"]{
|
|
|
|
if card["idList"] == list["id"]{
|
|
|
|
let file_path = format!("{}/{}.md", list_dir, card["name"].as_str().unwrap());
|
|
|
|
let file_path = format!("{}/{}.md", list_dir, card["name"].as_str().unwrap());
|
|
|
|
println!("{}", file_path);
|
|
|
|
println!("{}", file_path);
|
|
|
|
//let mut _file = fs::File::create(&file_path)?;
|
|
|
|
let mut file = fs::File::create(&file_path)?;
|
|
|
|
//let header_text = format!("# {}", card["name"]);
|
|
|
|
let header_text = format!("# {}\n", card["name"].as_str().unwrap());
|
|
|
|
//file.write_all(header_text.as_bytes())?;
|
|
|
|
file.write_all(header_text.as_bytes())?;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|