chore: remove orgize-sync package

This commit is contained in:
PoiScript 2019-10-10 10:44:59 +08:00
parent 5d26466e07
commit b15900b100
59 changed files with 62 additions and 647 deletions

29
src/export/mod.rs Normal file
View file

@ -0,0 +1,29 @@
//! Export `Org` struct to various formats.
pub mod html;
pub mod org;
pub use html::*;
pub use org::*;
use std::io::{Error, Write};
use crate::elements::Datetime;
pub(crate) fn write_datetime<W: Write>(
mut w: W,
start: &str,
datetime: &Datetime,
end: &str,
) -> Result<(), Error> {
write!(w, "{}", start)?;
write!(
w,
"{}-{:02}-{:02} {}",
datetime.year, datetime.month, datetime.day, datetime.dayname
)?;
if let (Some(hour), Some(minute)) = (datetime.hour, datetime.minute) {
write!(w, " {:02}:{:02}", hour, minute)?;
}
write!(w, "{}", end)
}