From: Ruben Beltran del Rio Date: Sat, 4 Jan 2025 22:44:25 +0000 (+0100) Subject: Use gema_texto for gemini parsing X-Git-Tag: 1.4.1~1 X-Git-Url: https://git.r.bdr.sh/rbdr/page/commitdiff_plain/4d946aebe3f70ad18e235d68474b6d489757c927?ds=sidebyside;hp=0e673283db8cfc3c9b572006d64e153d75e6a019 Use gema_texto for gemini parsing --- diff --git a/Cargo.lock b/Cargo.lock index 7e1370b..8d45daf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,10 +2,17 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "gema_texto" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4056ce8c83e74c7f51c4676baea6ac2f2dc508b69d018260b56ed1d618de09e3" + [[package]] name = "page" version = "1.4.0" dependencies = [ + "gema_texto", "test_utilities", ] diff --git a/Cargo.toml b/Cargo.toml index 5ce0102..529955a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,6 +8,7 @@ homepage = "https://r.bdr.sh/page.html" authors = ["Rubén Beltrán del Río "] [dependencies] +gema_texto = "1.0.0" [dev-dependencies] test_utilities = { path = "test_utilities" } diff --git a/LICENSE b/LICENSE index 42c05ef..59325b2 100644 --- a/LICENSE +++ b/LICENSE @@ -629,7 +629,7 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Radio, friend-to-friend application platform. + page, a command line tool to generate a static website and gemini capsule. Copyright (C) 2024 Ruben Beltran del Rio This program is free software: you can redistribute it and/or modify diff --git a/src/file_handler/file_strategies/gemini.rs b/src/file_handler/file_strategies/gemini.rs index 6cfb94d..4596378 100644 --- a/src/file_handler/file_strategies/gemini.rs +++ b/src/file_handler/file_strategies/gemini.rs @@ -5,8 +5,7 @@ use std::io::Write; use std::path::Path; use crate::file_handler::{File, FileType, Strategy as FileHandlerStrategy}; -use crate::gemini_parser::parse; -use crate::html_renderer::render_html; +use gema_texto::{gemini_parser::parse, html_renderer::render_html}; impl Strategy { fn is_title(line: &str) -> bool { diff --git a/src/main.rs b/src/main.rs index 6c7b8a9..0414288 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,5 @@ mod file_finder; mod file_handler; -mod gemini_parser; -mod html_renderer; use std::env::current_dir; use std::fs::{create_dir_all, remove_dir_all};