aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-01-04 23:44:25 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-01-04 23:44:25 +0100
commit4d946aebe3f70ad18e235d68474b6d489757c927 (patch)
tree29779493bf9c9c7a1add8ba186dc98539a0e15ee
parent0e673283db8cfc3c9b572006d64e153d75e6a019 (diff)
Use gema_texto for gemini parsing
-rw-r--r--Cargo.lock7
-rw-r--r--Cargo.toml1
-rw-r--r--LICENSE2
-rw-r--r--src/file_handler/file_strategies/gemini.rs3
-rw-r--r--src/main.rs2
5 files changed, 10 insertions, 5 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 7e1370b..8d45daf 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3,9 +3,16 @@
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 <page@r.bdr.sh>"]
[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};