Correct formatting fix for new file
This commit is contained in:
parent
3c414769b3
commit
cdbd832290
1 changed files with 8 additions and 16 deletions
24
src/main.rs
24
src/main.rs
|
@ -140,22 +140,14 @@ async fn main() -> Result<()> {
|
|||
file.write(format!("# {}\n\n", day.end.format("%Y-%m-%d")).as_bytes())?;
|
||||
|
||||
// TODO move to separate function
|
||||
file.write(create_back_link(&day.end, "[One week ago](diary:{})\n", 7).as_bytes())?;
|
||||
file.write(
|
||||
create_back_link(&day.end, "[One month ago](diary:{})\n", 30).as_bytes(),
|
||||
)?;
|
||||
file.write(
|
||||
create_back_link(&day.end, "[Six months ago](diary:{})\n", 6 * 30).as_bytes(),
|
||||
)?;
|
||||
file.write(
|
||||
create_back_link(&day.end, "[One year ago](diary:{})\n", 365).as_bytes(),
|
||||
)?;
|
||||
file.write(
|
||||
create_back_link(&day.end, "[Two years ago](diary:{})\n", 365 * 2).as_bytes(),
|
||||
)?;
|
||||
file.write(
|
||||
create_back_link(&day.end, "[Three years ago](diary:{})\n", 365 * 3).as_bytes(),
|
||||
)?;
|
||||
file.write(create_back_link(&day.end, "One week ago", 7).as_bytes())?;
|
||||
file.write(create_back_link(&day.end, "One month ago", 30).as_bytes())?;
|
||||
file.write(create_back_link(&day.end, "Six months ago", 6 * 30).as_bytes())?;
|
||||
file.write(create_back_link(&day.end, "One year ago", 365).as_bytes())?;
|
||||
file.write(create_back_link(&day.end, "Two years ago", 365 * 2).as_bytes())?;
|
||||
file.write(create_back_link(&day.end, "Three years ago", 365 * 3).as_bytes())?;
|
||||
|
||||
file.write(b"\n")?;
|
||||
file
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue