wechatmd

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Converter

type Converter struct {
	// contains filtered or unexported fields
}

Converter orchestrates driver -> parser -> image fetch -> storage.

func NewConverter

func NewConverter(opts ...Option) *Converter

NewConverter creates a converter with sensible defaults.

By default it uses: HTMLDriver + WechatParser + LocalStorage + http.DefaultClient.

func (*Converter) Convert

func (c *Converter) Convert(ctx context.Context, articleURL string, opts core.ConvertOptions) (*core.ArticleResult, error)

Convert fetches one WeChat article, converts markdown, downloads images, and saves output.

type Option

type Option func(*converterConfig)

Option configures a Converter.

func WithDriver

func WithDriver(d drv.Driver) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithParser

func WithParser(p prs.Parser) Option

func WithStorage

func WithStorage(s stg.Storage) Option

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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