Documentation
¶
Overview ¶
Package w3mview: W3m console browser automation for webpage output Provides command-line webpage rendering using w3m text browser Enables HTML content display in console environment with text-based output Supports both URL opening and direct HTML content processing via w3m
w3mview: 用于网页输出的 W3m 控制台浏览器自动化 使用 w3m 文本浏览器提供命令行网页渲染 在控制台环境中启用 HTML 内容显示,提供基于文本的输出 支持通过 w3m 进行 URL 打开和直接 HTML 内容处理
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DumpLink ¶
DumpLink fetches webpage from URL using w3m and returns the text output as string Converts remote webpage to plain text without logging, useful for testing and validation Returns rendered text result for programmatic processing
DumpLink 使用 w3m 从 URL 获取网页并返回文本输出字符串 将远程网页转换为纯文本但不打印日志,适用于测试和验证 返回渲染的文本结果以供程序化处理
func DumpPage ¶
DumpPage renders HTML content using w3m and returns the text output as string Converts HTML to plain text without logging, useful for testing and validation Returns rendered text result for programmatic processing
DumpPage 使用 w3m 渲染 HTML 内容并返回文本输出字符串 将 HTML 转换为纯文本但不打印日志,适用于测试和验证 返回渲染的文本结果以供程序化处理
func Open ¶
Open displays webpage content from URL using w3m browser in console Executes w3m with -dump option to render webpage as text output Logs rendered webpage content for console-based webpage viewing
Open 使用 w3m 浏览器在控制台中显示来自 URL 的网页内容 使用 -dump 选项执行 w3m 以将网页渲染为文本输出 记录渲染的网页内容以供基于控制台的网页查看
func Show ¶
Show renders HTML content directly using w3m browser via stdin input Executes w3m with HTML input to display content as console text output Processes HTML strings and displays formatted text results
Show 通过 stdin 输入使用 w3m 浏览器直接渲染 HTML 内容 使用 HTML 输入执行 w3m 以将内容显示为控制台文本输出 处理 HTML 字符串并显示格式化的文本结果
Types ¶
type Pane ¶
type Pane struct {
// contains filtered or unexported fields
}
Pane manages w3m automation with webpage output Provides coordinated webpage generation and w3m opening with HTTP service Handles temp HTTP service and console operations
Pane 管理 w3m 浏览器自动化与网页输出控制 提供协调的网页生成和 w3m 打开及 HTTP 服务 处理临时 HTTP 服务和控制台浏览器操作
func NewPane ¶
func NewPane() *Pane
NewPane creates w3m automation with default configuration Initializes console automation using default HTTP test PageSite and debug command setup Returns configured w3m automation instance with best settings
NewPane 使用默认配置创建 w3m 自动化 使用默认 HTTP 测试 PageSite 和调试命令设置初始化控制台自动化 返回具有最佳设置的已配置 w3m 自动化实例
func NewPaneWith ¶
NewPaneWith creates w3m automation instance with custom PageSite and execConfig Initializes console browser automation using provided HTTP PageSite and OS command configuration Returns configured w3m automation instance for coordinated console browser operations
NewPaneWith 使用自定义 PageSite 和执行配置创建 w3m 自动化实例 使用提供的 HTTP PageSite 和操作系统命令配置初始化控制台浏览器自动化 返回配置的 w3m 自动化实例以实现协调的控制台浏览器操作
func (*Pane) Close ¶
func (p *Pane) Close()
Close terminates w3m automation and shuts down HTTP PageSite Stops the temp HTTP test PageSite used in webpage hosting Cleans up resources used by w3m automation instance
Close 终止 w3m 自动化并关闭 HTTP PageSite 停止用于网页托管的临时 HTTP 测试 PageSite 清理 w3m 自动化实例使用的资源
func (*Pane) Show ¶
Show displays single HTML page content using w3m in console Creates temp URL and opens it via w3m to view in console Generates unique path and serves page via HTTP PageSite
Show 使用 w3m 浏览器在控制台中显示单个 HTML 页面内容 为 HTML 内容创建临时 URL 并通过 w3m 打开以供控制台查看 生成唯一路径并通过 HTTP PageSite 提供页面