guides

package
v0.0.0-...-e489f9a Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FurtherFormattedFormats = []SpecificFormatter{
	{
		Extension: ".md",
		Formatter: MarkdownFormatting,
	},
	{
		Extension: ".png",
		Formatter: RenderImage,
	},
	{
		Extension: ".jpg",
		Formatter: RenderImage,
	},
	{
		Extension: ".jpeg",
		Formatter: RenderImage,
	},
}
View Source
var SupportedFormats = []string{

	".txt",
	".md",
	".rst",
	".adoc",
	".tex",

	".html",
	".htm",
	".xhtml",
	".xml",
	".svg",
	".mml",
	".kml",

	".css",
	".scss",
	".sass",

	".ini",
	".conf",
	".cfg",
	".json",
	".yaml",
	".yml",
	".toml",
	".env",

	".csv",
	".tsv",
	".psv",
	".ndjson",

	".sql",
	".sparql",
	".graphql",

	".png",
	".jpg",
	".jpeg",

	".py",
	".js",
	".ts",
	".go",
	".java",
	".c",
	".cpp",
	".cs",
	".rs",
	".php",
	".rb",
	".pl",
	".lua",
	".kt",
	".sh",
	".bat",
	".zsh",
	".fish",
	".swift",
	".scala",
	".erl",
	".ex",
	".exs",
	".clj",
	".dart",
	".vb",
	".asm",

	".bib",
	".rtf",
	".man",
	".me",
	".ms",

	".r",
	".tex",
	".dtd",
	".wxml",
	".plist",
}

Functions

func GuidesFolderFromWorkingDirectory

func GuidesFolderFromWorkingDirectory() string

func MarkdownFormatting

func MarkdownFormatting(_, content string, width, _ int) string

func RenderImage

func RenderImage(path, _ string, width int, height int) string

Types

type ChangeViewingGuideMsg

type ChangeViewingGuideMsg string

type Guide

type Guide string

func (Guide) CheckIfExists

func (g Guide) CheckIfExists() bool

func (Guide) GetFileName

func (g Guide) GetFileName() string

func (Guide) GetFullPath

func (g Guide) GetFullPath() string

type SpecificFormatter

type SpecificFormatter struct {
	Extension string
	Formatter func(path, content string, width, height int) string
}

Jump to

Keyboard shortcuts

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