2 unstable releases
Uses new Rust 2024
new 0.2.0 | Apr 28, 2025 |
---|---|
0.1.0 | Apr 28, 2025 |
#1251 in Parser implementations
23 downloads per month
42KB
840 lines
notion-to-jarkup
Convert Notion blocks into jarkup JSON.
Example
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
dotenvy::dotenv().ok();
let notion_api_key = std::env::var("NOTION_API_KEY")?;
let block_id = std::env::var("BLOCK_ID")?;
let notionrs_client = notionrs::client::Client::new().secret(notion_api_key);
let reqwest_client = reqwest::Client::new();
let client = notion_to_jarkup::client::Client {
notionrs_client,
reqwest_client,
};
let result = client.convert_block(&block_id).await?;
println!("{}", serde_json::to_string(&result).unwrap());
Ok(())
}
Dependencies
~8–20MB
~281K SLoC