piece
typepiece is one entry in the index. The gallery stores no art. Every piece lives in somebody's realm and this is a pointer to it, which is why there is no package-level state anywhere in this realm and nothing here survives or needs to survive a redeploy.
Value
v0.piece
catalog
func() []v0.piececatalog is built per call rather than held in a package-level var: a func value is not something to persist, and a realm that stores nothing should not be paying storage for its own index.
- OID
- 0f90c5…f1a1:3
catalog details
find
func(slug string) (v0.piece, bool)- OID
- 0f90c5…f1a1:5
find details
realmPath
untyped stringrealmPath is this realm's own path, version included. gnoweb does NOT resolve an unversioned realm path to its latest version: it serves /r/moul/gallery as a DIRECTORY INDEX and drops the :path and ?query entirely. Measured 2026-09-30 on gnoland-1, where /r/moul/outfmt:?fmt=json renders the index page while /r/moul/outfmt/v0:?fmt=json returns the JSON. So every self-link has to carry the version, and stating it once is what keeps the next one from being written without it. Only r/moul/home and r/moul/blog are genuinely unversioned paths.
Value
"/r/moul/gallery/v0"
Render
func(path string) string- OID
- 0f90c5…f1a1:6
Render details
banner
func() stringbanner is drawn with p/moul/art rather than typed as a string literal, because a gallery that hand-writes its own ASCII would be a poor advert for the library it exists to show.
- OID
- 0f90c5…f1a1:8
banner details
renderIndex
func(text bool) string- OID
- 0f90c5…f1a1:9
renderIndex details
renderPiece
func(slug string, text bool) string- OID
- 0f90c5…f1a1:10
renderPiece details
plural
func(n int, word string) string- OID
- 0f90c5…f1a1:11
plural details
itoa
func(v int) string- OID
- 0f90c5…f1a1:12
itoa details
doc
typedoc builds the plain-text target: a document that reads well as-is, rather than markdown with the syntax characters deleted. This is a prototype, deliberately small and deliberately here rather than in a p/ package. Porting one realm is not enough to know what the shared document model should be; porting the fifth will be. What it already pins is the set of rules that make text good instead of merely stripped: 1. A link prints its text inline and collects the URL into a numbered footnote. Never "\[text](url)", which is the single worst thing markdown does to a terminal reader. 2. A heading is underlined, not prefixed with '#'. 3. Art is emitted verbatim: never wrapped, never escaped, never fenced. 4. Prose is wrapped at a fixed width; art and fields are not.
Value
v0.doc
width
untyped bigintwidth is where prose wraps. 72 leaves room for a quoting prefix in an email or a diff without re-wrapping.
Value
(72 <untyped> bigint)
joinPadded
func(cells []string, w []int) stringjoinPadded pads every cell but the last, which would only add trailing space.
- OID
- 0f90c5…f1a1:13
joinPadded details
wrap
func(s string, w int) stringwrap breaks on spaces at w runes. A word longer than w is left alone rather than cut: a URL or a realm path is worse broken than wide.
- OID
- 0f90c5…f1a1:15
wrap details
runeLen
func(s string) int- OID
- 0f90c5…f1a1:16