-- Leo's gemini proxy

-- Connecting to www.underworld.fr:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-US

PAGE EXEMPLE


titre en gros


titre en moins gros


titre en petit


puce1

puce2

puce3


Lien vers un site http externe

https://gemini.circumlunar.space/


Lien vers un site gemini externe

gemini://gemini.circumlunar.space/


Lien vers un media externe sur http

https://cdn.pixabay.com/photo/2018/02/16/23/01/snow-3158868_1280.jpg


Lien vers un media mp3 local

../medias/whitestripes.mp3


Lien vers un media jpg local

../medias/gemini.jpg


Du code bien présenté

def extract_first_heading(filename, default=""):
    """
    Open a file which is presumed to contain text/gemini content and return
    the contents of the first heading line (regardless of heading level).
    If no heading lines are found, return the specified default.
    """
    with open(filename) as fp:
        for line in fp:
            if line.startswith("#"):
                while line[0] == "#":
                    line = line[1:]
                return line.strip()
    return default

Une citation

> Hello World


-- Response ended

-- Page fetched on Sun Jun 2 11:04:45 2024