content

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package content converts non-HTML page bodies — JSON, plain text, RSS/Atom/JSON feeds, PDF, and images — into Markdown for the read pipeline. It is dispatched by page.Kind from the browser orchestrator, mirroring how reduce/emit run for HTML pages.

Boundary: converters operate on raw bytes and must NOT import the HTML parser (golang.org/x/net/html) or cascadia — dom keeps that monopoly. Feeds are parsed as XML/JSON via gofeed; the stdlib "html" entity decoder is fine (it is not the x/net/html parser).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(ctx context.Context, p *page.Page) error

Render converts a non-HTML page into Markdown in place, setting p.Markdown and upgrading p.Meta.Title when a converter yields a better one. It is safe to call for any non-HTML Kind; HTML pages flow through reduce/emit instead.

Types

This section is empty.

Directories

Path Synopsis
Package feed converts RSS, Atom, and JSON feeds into a Markdown summary.
Package feed converts RSS, Atom, and JSON feeds into a Markdown summary.
Package image produces a Markdown manifest for an image response — type, dimensions, byte size, and filename — without inlining the pixels.
Package image produces a Markdown manifest for an image response — type, dimensions, byte size, and filename — without inlining the pixels.
Package pdf extracts text from PDF documents and renders it as Markdown.
Package pdf extracts text from PDF documents and renders it as Markdown.

Jump to

Keyboard shortcuts

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