Crates.io | notion-to-jarkup |
lib.rs | notion-to-jarkup |
version | |
source | src |
created_at | 2025-04-28 11:11:49.052825+00 |
updated_at | 2025-05-09 14:09:55.750023+00 |
description | Convert Notion blocks into jarkup JSON. |
homepage | |
repository | https://github.com/46ki75/notion-to-jarkup |
max_upload_size | |
id | 1652080 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Convert Notion blocks into jarkup JSON.
#[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(())
}