*: Add project logo

This commit is contained in:
Steffo 2025-02-14 06:34:43 +01:00
parent 3146df6898
commit 41b6c6be7b
Signed by: steffo
GPG key ID: 6B8E18743E7E1F86
8 changed files with 27 additions and 12 deletions

View file

@ -1,3 +1,5 @@
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
use axum::routing::{get, post};
use acrate_utils::web_server;

View file

@ -1,2 +1,4 @@
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
pub mod linkeddata;
pub mod vocabulary;

View file

@ -8,7 +8,8 @@ use json_ld::context_processing::{Process};
use static_iref::{iri, iri_ref};
use acrate_astreams::linkeddata::LangDir;
use acrate_astreams::linkeddata::IsLinkedDataWriteWrapper;
use acrate_astreams::vocabulary::activitystreams_core::ObjectMut;
use acrate_astreams::vocabulary::activitystreams_core::{ActivityMut, ObjectMut};
use acrate_astreams::vocabulary::activitystreams_extended::NoteMut;
macro_rules! jsonld_document {
($modname:ident: $filename:literal) => {
@ -58,36 +59,36 @@ macro_rules! jsonld_document {
jsonld_document!(ex: "activitystreams/examples/118.json");
#[tokio::test]
async fn test_something() -> anyhow::Result<()> {
async fn test_something() {
let mut node = ex::main_node().await;
{
let mut object = ObjectMut::from_mut(&mut node);
let mut object = NoteMut::from_mut_checked(&mut node);
let mut object = object.try_into_write_wrapper::<ObjectMut<_>>().unwrap();
object.set_name(vec![
("NoLanguage1".to_string(), LangDir::Neither),
("NoLanguage2".to_string(), LangDir::Neither),
("English1".to_string(), LangDir::Language(LangTagBuf::from_str("en")?)),
("Italian1".to_string(), LangDir::Language(LangTagBuf::from_str("it")?))
])?;
("English1".to_string(), LangDir::Language(LangTagBuf::from_str("en").unwrap())),
("Italian1".to_string(), LangDir::Language(LangTagBuf::from_str("it").unwrap()))
]).unwrap();
}
let doc = json_ld::ser::serialize(&node)?;
let doc = json_ld::ser::serialize(&node).unwrap();
let mut generator = Blank::new();
let flattened = doc.flatten(&mut generator, true)?;
let flattened = doc.flatten(&mut generator, true).unwrap();
let mut loader = json_ld::ReqwestLoader::new();
let context = Context::iri_ref(iri_ref!("https://www.w3.org/ns/activitystreams").to_owned());
let processed = context.process(&mut (), &loader, None).await?;
let processed = context.process(&mut (), &loader, None).await.unwrap();
let processed_ref = processed.as_ref();
let value = flattened.compact(processed_ref, &mut loader).await?;
let value = flattened.compact(processed_ref, &mut loader).await.unwrap();
let print = value.pretty_print();
println!("{print}");
Ok(())
}

View file

@ -1,5 +1,7 @@
//! Database schema, migrations, and high level database-reliant structures for the [`acrate`] project.
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
/// Database schema information automatically generated by [`diesel`].
///
/// Configured by `diesel.toml`.

View file

@ -8,6 +8,8 @@
//! - <https://codeberg.org/fediverse/fep/src/branch/main/fep/f1d5/fep-f1d5.md>
//!
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
use mediatype::MediaTypeBuf;
use serde::Deserialize;
use thiserror::Error;

View file

@ -5,6 +5,8 @@
//! - <https://datatracker.ietf.org/doc/html/rfc6415>
//! - <https://datatracker.ietf.org/doc/html/rfc7033>
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
pub mod jrd;
pub mod xrd;
pub mod any;

View file

@ -1,3 +1,5 @@
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
use axum::routing::get;
use acrate_utils::web_server;

View file

@ -1,3 +1,5 @@
#![doc(html_logo_url = "https://forge.steffo.eu/unimore/tirocinio-canali-steffo-acrate/raw/branch/main/.media/icon-128x128_round.png")]
pub mod ext;
pub mod init;
pub mod run;