/* * Copyright (c) 2025–2026 Emma Tebibyte * SPDX-License-Identifier: AGPL-3.0-or-later * * This file is part of Mintee. * * Mintee is free software: you can redistribute it and/or modify it under the * terms of the GNU Affero General Public License as published by the Free * Software Foundation, either version 3 of the License, or (at your option) * any later version. * * Mintee is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with Mintee. If not, see https://www.gnu.org/licenses/. */ use std::{ env::current_dir, error::Error, io::stdout, }; use mintee::backend::render::{ Page, PageKind, Repo }; fn main() -> Result<(), Box> { let path = current_dir()?; let name = String::from_utf8( path.file_name().unwrap().to_os_string().into_encoded_bytes() )?; let entity = String::from_utf8( path.parent().unwrap().as_os_str().to_os_string().into_encoded_bytes() )?; let repo = Repo::new( entity, name, None, None, ); let page = Page::new( PageKind::Repo(repo), None, ); page.render(&mut stdout()) }