Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HTMLToMarkdown ¶
HTMLToMarkdown converts HTML content to Markdown format using the html-to-markdown library.
Types ¶
type EPUBFormatter ¶
type EPUBFormatter struct{}
EPUBFormatter implements the Formatter interface for EPUB output.
func NewEPUBFormatter ¶
func NewEPUBFormatter() *EPUBFormatter
NewEPUBFormatter creates a new EPUB formatter.
type Formatter ¶
type Formatter interface {
// Format writes the formatted digest to the provided writer
Format(w io.Writer, digest *models.Digest, opts *Options) error
}
Formatter defines the interface for digest output formatters.
type MarkdownFormatter ¶
type MarkdownFormatter struct{}
MarkdownFormatter implements the Formatter interface for Markdown output.
func NewMarkdownFormatter ¶
func NewMarkdownFormatter() *MarkdownFormatter
NewMarkdownFormatter creates a new Markdown formatter.
type Options ¶
type Options struct {
// IncludeSummary toggles whether article summaries are included
IncludeSummary bool
// IncludeMetadata toggles whether metadata is included
IncludeMetadata bool
// StoreImages toggles whether to store images locally. Doesn't apply to
// Markdown.
StoreImages bool
// Fetcher is a fetcher used to fetch images and other resources if
// required.
Fetcher fetcher.Fetcher
// AdditionalOptions contains format-specific options
AdditionalOptions map[string]any
}
Options contains configuration options for formatters.
func DefaultOptions ¶
func DefaultOptions() Options
Click to show internal directories.
Click to hide internal directories.