panews-web-viewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Fetches
www.panewslab.com
pages as Markdown via
Accept: text/markdown
. Responses include a YAML frontmatter block with page metadata (
title
,
description
,
image
).
Current first-class support in this skill is single-page fetching through the bundled script below. It is intended for homepage, article-page, and column-page reads, not broad site crawling.
通过
Accept: text/markdown
请求头获取
www.panewslab.com
页面的Markdown格式内容。响应结果包含一个带有页面元数据(
title
description
image
)的YAML前置块。
当前该技能的核心支持是通过下方绑定的脚本实现单页面获取。它适用于首页、文章页和专栏页的读取,而非全站爬取。

When to Use

适用场景

  • The user provides or implies a PANews web URL
  • The task is to read the rendered article page, homepage, or column page as Markdown
  • The caller wants the page content, not the underlying JSON API shape
  • 用户提供或指向一个PANews网页URL
  • 任务需求是将渲染后的文章页、首页或专栏页读取为Markdown格式
  • 调用方需要页面内容,而非底层JSON API结构

Do Not Use When

不适用场景

  • The task is structured search, rankings, or filtered API retrieval
  • The task requires creator authentication or write access
  • The user asks for JSON fields rather than page Markdown
  • 任务为结构化搜索、排名或可过滤的API检索
  • 任务需要创作者认证或写入权限
  • 用户要求获取JSON字段而非页面的Markdown内容

Supported Languages

支持的语言

LocalePrefix
Simplified Chinese
/zh
Traditional Chinese
/zh-hant
English
/en
Japanese
/ja
Korean
/ko
区域设置前缀
简体中文
/zh
繁体中文
/zh-hant
英文
/en
日文
/ja
韩文
/ko

Standard Workflow

标准工作流程

text
PANews Web Progress:
- [ ] Step 1: Confirm this is a website-page task, not an API task
- [ ] Step 2: Choose the locale prefix
- [ ] Step 3: Fetch with Accept: text/markdown
- [ ] Step 4: Preserve frontmatter metadata in the response
text
PANews Web Progress:
- [ ] Step 1: Confirm this is a website-page task, not an API task
- [ ] Step 2: Choose the locale prefix
- [ ] Step 3: Fetch with Accept: text/markdown
- [ ] Step 4: Preserve frontmatter metadata in the response

Scripts

脚本

bash
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs <path-or-url> [--lang zh]
bash
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs <path-or-url> [--lang zh]

Usage

使用示例

bash
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs /articles/ARTICLE_ID --lang en
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs https://www.panewslab.com/zh-hant/columns/COLUMN_ID
bash
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs /articles/ARTICLE_ID --lang en
node {Skills Directory}/panews-web-viewer/scripts/fetch-page.mjs https://www.panewslab.com/zh-hant/columns/COLUMN_ID

Rules

规则

  • Prefer the bundled
    fetch-page.mjs
    script; if you fall back to
    curl
    , use
    -sSL
  • Always include the locale prefix in the URL
  • Route to
    panews
    if the user asks for structured search or filterable API data
  • 优先使用绑定的
    fetch-page.mjs
    脚本;如果回退到
    curl
    ,请使用
    -sSL
    参数
  • URL中必须包含区域设置前缀
  • 如果用户需要结构化搜索或可过滤的API数据,请转向
    panews
    相关服务

Failure Handling

故障处理

  • If the page returns
    404
    , report it as unavailable rather than trying to synthesize content from API endpoints
  • If the caller gives a path without a locale prefix, add the prefix from
    --lang
    or default to
    zh
  • 如果页面返回
    404
    ,请直接报告页面不可用,不要尝试从API端点合成内容
  • 如果调用方提供的路径没有区域设置前缀,请添加
    --lang
    参数指定的前缀,或默认使用
    zh