yuzu

module
v0.0.0-...-e184c4b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: GPL-3.0

README

Yuzu

NOTE: THIS PROJECT IS WIP

Yuzu is a gemenai browser and a fork of Amfora. It aims to implement basic scripting the gemenai protocal that keeps the power in the users hands.

As markdown is already supported in Gemeni, Yuzu fold all code blocks annoted as scripts and gives you the option to run them requiring you explicit input.

This change of paradimgn where code is displayed inline and users have to volentarily run the code aims to discorage what has happend to the modern web without the nuclear options of removing all scripting.

To use the code any language that supports WASI is good, however sticking to the more popular once is better as code needs to be compiled on the users system and so using more common compilers is better.

/// Run this code to enable live search on the page
Page::search_bar()?.set_callback(|input| {
    Page::list()?.text.edit(|text| {
        text
            .lines()
            .filter(|line| line.contain(input))
        })
})

To define html like tags to query elements the must be labled withing the documents like this:

< dynamic>

You could write some code to have this header change!

< \dynamic>

You could then query this element as Page::dynamic() and make changes to it.

IMPORTANT NOTE

Yuzu is not trying to change the way gemeni works. Part of the magic is that beacuse these code snippets are showed on other sites in plain text it encorages websites to keep it to a minimal.

This is great as it means that people think twice before putting code in their websites.

Although some people disable js on the web they are a sever minority and so websites can afford to exclude these people. The goal is to make that not an option on gemeni

TODO

  • Bookmarks

Directories

Path Synopsis
src
cache
Package cache provides an interface for a cache of strings, aka text/gemini pages, and redirects.
Package cache provides an interface for a cache of strings, aka text/gemini pages, and redirects.
client
Package client retrieves data over Gemini and implements a TOFU system.
Package client retrieves data over Gemini and implements a TOFU system.
config
Package config initializes all files required for Amfora, even those used by other packages.
Package config initializes all files required for Amfora, even those used by other packages.
display
nolint
nolint
renderer
Package renderer provides functions to convert various data into a cview primitive.
Package renderer provides functions to convert various data into a cview primitive.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL