scripts

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package scripts declares selfdoc's hand-run maintenance scripts and renders the commands that fetch and run one.

Why a refusal cannot name a repository path

The scripts live in selfdoc's own repository under scripts/, and no release artifact carries them: a consumer installs the binary, from the module proxy or from a platform archive, and never has selfdoc's checkout. A refusal that told such a consumer to run "python3 scripts/<name>" named a path their repository does not have, so the remedy could not be executed as printed.

Every refusal therefore renders Fetch and Run from here: one command that downloads the script into the working directory, and one that runs it. The two script names and the address they are fetched from are declared once, in this package, so a message, a docs page and a test cannot disagree about them.

Index

Constants

View Source
const (
	// Move is the one-way move of a repository onto selfdoc's .stricttools/
	// layout. Every refusal of the old layout names it.
	Move = "move-to-stricttools-layout.py"
	// ConvertFrontmatter rewrites a document's retired "---" frontmatter
	// block into the TOML block selfdoc reads. Every refusal of a retired
	// block names it.
	ConvertFrontmatter = "convert-frontmatter-to-toml.py"
)

The maintenance scripts, by the filename each one carries.

View Source
const RawBase = "https://raw.githubusercontent.com/stricttools/selfdoc/main/scripts/"

RawBase is the address the scripts are served from, up to the filename.

It is the repository's default branch rather than a tag: a script is maintained after the release that first refused without it, and the person running one wants the maintained version.

Variables

This section is empty.

Functions

func Fetch

func Fetch(name string) string

Fetch renders the command that downloads a script into the working directory, under its own filename.

func RepoPath

func RepoPath(name string) string

RepoPath is a script's path inside selfdoc's own checkout, which is where it is edited and where the suite drives it.

func Run

func Run(name string, args ...string) string

Run renders the command that runs a fetched script with args.

Types

This section is empty.

Jump to

Keyboard shortcuts

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