Documentation
¶
Overview ¶
Package w3mopenpage: 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
w3mopenpage: 用于网页输出的 W3m 控制台浏览器自动化 使用 w3m 文本浏览器提供命令行网页渲染 在控制台环境中启用 HTML 内容显示,提供基于文本的输出 支持通过 w3m 进行 URL 打开和直接 HTML 内容处理
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 W3mShowPage ¶
type W3mShowPage struct {
// contains filtered or unexported fields
}
W3mShowPage manages w3m browser automation with webpage output control Provides coordinated webpage generation and w3m opening with HTTP service Handles temporary HTTP service and console browser operations
W3mShowPage 管理 w3m 浏览器自动化与网页输出控制 提供协调的网页生成和 w3m 打开及 HTTP 服务 处理临时 HTTP 服务和控制台浏览器操作
func NewW3mDrawPage ¶
func NewW3mDrawPage() *W3mShowPage
NewW3mDrawPage creates w3m automation with default configuration for development Initializes console browser automation using default HTTP test service and debug command setup Returns ready-to-use w3m automation handler with optimal development settings
NewW3mDrawPage 使用开发的默认配置创建 w3m 自动化 使用默认 HTTP 测试服务和调试命令设置初始化控制台浏览器自动化 返回具有优化开发设置的即用 w3m 自动化处理器
func NewW3mShowPage ¶
func NewW3mShowPage(service *gintestpage.Service, command *osexec.OsCommand) *W3mShowPage
NewW3mShowPage creates w3m automation instance with custom service and command Initializes console browser automation using provided HTTP service and OS command configuration Returns configured w3m automation handler for coordinated console browser operations
NewW3mShowPage 使用自定义服务和命令创建 w3m 自动化实例 使用提供的 HTTP 服务和操作系统命令配置初始化控制台浏览器自动化 返回配置的 w3m 自动化处理器以实现协调的控制台浏览器操作
func (*W3mShowPage) Close ¶
func (op *W3mShowPage) Close()
Close terminates w3m automation and shuts down HTTP service Stops the temporary HTTP test service used for webpage hosting Cleans up resources used by w3m automation instance
Close 终止 w3m 自动化并关闭 HTTP 服务 停止用于网页托管的临时 HTTP 测试服务 清理 w3m 自动化实例使用的资源
func (*W3mShowPage) Show ¶
func (op *W3mShowPage) Show(page string)
Show displays single HTML page content using w3m browser in console Creates temporary URL for HTML content and opens it via w3m for console viewing Generates unique path and serves page through HTTP service
Show 使用 w3m 浏览器在控制台中显示单个 HTML 页面内容 为 HTML 内容创建临时 URL 并通过 w3m 打开以供控制台查看 生成唯一路径并通过 HTTP 服务提供页面
func (*W3mShowPage) ShowPages ¶
func (op *W3mShowPage) ShowPages(pages ...string)
ShowPages displays multiple HTML pages sequentially using w3m browser Creates temporary URLs for each HTML page and opens them via w3m for console viewing Processes pages in order with unique paths for each page
ShowPages 使用 w3m 浏览器依序显示多个 HTML 页面 为每个 HTML 页面创建临时 URL 并通过 w3m 打开以供控制台查看 为每个页面使用唯一路径按顺序处理页面