switch to yaml cuz forgejo
This commit is contained in:
parent
3e7fbea3bb
commit
f9a44d742e
6 changed files with 32 additions and 23 deletions
12
Cargo.lock
generated
12
Cargo.lock
generated
|
@ -789,7 +789,6 @@ checksum = "da11047dc6b6b3f21012056a0f9177e435a0ce4f34e1c5e7990b01342c0d4e49"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_yaml",
|
"serde_yaml",
|
||||||
"toml 0.5.11",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -1857,7 +1856,7 @@ dependencies = [
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-util",
|
"tokio-util",
|
||||||
"toml 0.8.12",
|
"toml",
|
||||||
"tower-http",
|
"tower-http",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
|
@ -2104,15 +2103,6 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml"
|
|
||||||
version = "0.5.11"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "toml"
|
name = "toml"
|
||||||
version = "0.8.12"
|
version = "0.8.12"
|
||||||
|
|
|
@ -31,7 +31,7 @@ clap = { version = "4.5.4", features = ["derive"], optional = true }
|
||||||
color-eyre = "0.6.3"
|
color-eyre = "0.6.3"
|
||||||
comrak = { version = "0.22.0", features = ["syntect"] }
|
comrak = { version = "0.22.0", features = ["syntect"] }
|
||||||
console-subscriber = { version = "0.2.0", optional = true }
|
console-subscriber = { version = "0.2.0", optional = true }
|
||||||
fronma = { version = "0.2.0", features = ["toml"] }
|
fronma = "0.2.0"
|
||||||
futures-util = "0.3.30"
|
futures-util = "0.3.30"
|
||||||
notify = "6.1.1"
|
notify = "6.1.1"
|
||||||
scc = "2.1.0"
|
scc = "2.1.0"
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
title = "README"
|
title: "README"
|
||||||
description = "the README.md file of this project"
|
description: "the README.md file of this project"
|
||||||
author = "slonkazoid"
|
author: "slonkazoid"
|
||||||
---
|
---
|
||||||
|
|
||||||
# silly-blog
|
# silly-blog
|
||||||
|
|
|
@ -16,10 +16,7 @@ impl Display for FronmaBalls {
|
||||||
match &self.0 {
|
match &self.0 {
|
||||||
fronma::error::Error::MissingBeginningLine => f.write_str("missing beginning line"),
|
fronma::error::Error::MissingBeginningLine => f.write_str("missing beginning line"),
|
||||||
fronma::error::Error::MissingEndingLine => f.write_str("missing ending line"),
|
fronma::error::Error::MissingEndingLine => f.write_str("missing ending line"),
|
||||||
fronma::error::Error::SerdeYaml(_) => {
|
fronma::error::Error::SerdeYaml(yaml_error) => write!(f, "{}", yaml_error),
|
||||||
unimplemented!("no yaml allowed in this household")
|
|
||||||
}
|
|
||||||
fronma::error::Error::Toml(toml_error) => write!(f, "{}", toml_error),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,8 +6,7 @@ use std::time::{Duration, Instant, SystemTime};
|
||||||
|
|
||||||
use askama::Template;
|
use askama::Template;
|
||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
use fronma::engines::Toml;
|
use fronma::parser::{parse, ParsedData};
|
||||||
use fronma::parser::{parse_with_engine, ParsedData};
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use tokio::fs;
|
use tokio::fs;
|
||||||
use tokio::io::AsyncReadExt;
|
use tokio::io::AsyncReadExt;
|
||||||
|
@ -113,7 +112,7 @@ impl PostManager {
|
||||||
let mut content = String::with_capacity(stat.len() as usize);
|
let mut content = String::with_capacity(stat.len() as usize);
|
||||||
file.read_to_string(&mut content).await?;
|
file.read_to_string(&mut content).await?;
|
||||||
|
|
||||||
let ParsedData { headers, body } = parse_with_engine::<FrontMatter, Toml>(&content)?;
|
let ParsedData { headers, body } = parse::<FrontMatter>(&content)?;
|
||||||
let metadata = headers.into_full(name.to_owned(), created, Some(modified));
|
let metadata = headers.into_full(name.to_owned(), created, Some(modified));
|
||||||
let parsing = parsing_start.elapsed();
|
let parsing = parsing_start.elapsed();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,28 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<!--
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2021 Catppuccin
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
-->
|
||||||
<plist version="1.0">
|
<plist version="1.0">
|
||||||
<dict>
|
<dict>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
|
@ -2018,4 +2041,4 @@
|
||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in a new issue