parser

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginFileHeaders

type PluginFileHeaders struct {
	Name            string
	Author          string
	Description     string
	License         string
	PluginURI       string
	Version         string
	RequiresPHP     string
	RequiresWP      string
	RequiresPlugins []string
	Tags            []string
}

func GetPluginHeaders

func GetPluginHeaders(filePath string) (PluginFileHeaders, error)

GetPluginHeaders retrieves headers for a WordPress plugin file.

type ReadmeParser

type ReadmeParser struct {
	Name            string
	MetaDescription string
	Contributors    []string
	Tags            []string
	Requires        string
	Tested          string
	RequiresPHP     string
	StableTag       string
	License         string
	LicenseURI      string
	DonateLink      string

	Sections      map[string]string
	Screenshots   map[int]string
	FAQ           map[string]string
	UpgradeNotice map[string]string
}

func NewReadmeParser

func NewReadmeParser() *ReadmeParser

func (*ReadmeParser) GetMetadata

func (p *ReadmeParser) GetMetadata() map[string]any

func (*ReadmeParser) Parse

func (p *ReadmeParser) Parse(content string)

Parse reads and parses the readme.txt content.

func (*ReadmeParser) ToMarkdown

func (p *ReadmeParser) ToMarkdown() string

type ThemeFileHeaders

type ThemeFileHeaders struct {
	Name        string
	Author      string
	Description string
	License     string
	ThemeURI    string
	Version     string
	RequiresWP  string
	RequiresPHP string
	Tags        []string
}

func GetThemeHeaders

func GetThemeHeaders(filePath string) (ThemeFileHeaders, error)

GetThemeHeaders retrieves headers for a WordPress theme stylesheet.

Jump to

Keyboard shortcuts

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