|
|
|
|
@ -12,8 +12,9 @@ fn main() -> std::io::Result<()> {
|
|
|
|
|
let board_dir = format!("{}/{}", output_dir, json_data["name"].as_str().unwrap());
|
|
|
|
|
fs::create_dir(&board_dir)?;
|
|
|
|
|
|
|
|
|
|
if let Value::Array(lists) = &json_data["lists"]{
|
|
|
|
|
if let Value::Array(cards) = &json_data["cards"]{
|
|
|
|
|
let lists = json_data["lists"].as_array().unwrap();
|
|
|
|
|
let cards = json_data["cards"].as_array().unwrap();
|
|
|
|
|
let checklists = json_data["checklists"].as_array().unwrap();
|
|
|
|
|
for list in lists {
|
|
|
|
|
let list_dir = format!("{}/{}", board_dir, list["name"].as_str().unwrap());
|
|
|
|
|
fs::create_dir(&list_dir)?;
|
|
|
|
|
@ -23,7 +24,6 @@ fn main() -> std::io::Result<()> {
|
|
|
|
|
let mut file = fs::File::create(&file_path)?;
|
|
|
|
|
let header_text = format!("# {}\n\n", card["name"].as_str().unwrap());
|
|
|
|
|
file.write_all(header_text.as_bytes())?;
|
|
|
|
|
let checklists = json_data["checklists"].as_array().unwrap();
|
|
|
|
|
for checklist in checklists {
|
|
|
|
|
if checklist["idCard"] == card["id"]{
|
|
|
|
|
let checklist_title = format!("## {}\n\n", checklist["name"].as_str().unwrap());
|
|
|
|
|
@ -33,7 +33,5 @@ fn main() -> std::io::Result<()> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
|