Skip to content

huyi9531/gnomic_cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gnomic-cli

新闻搜索、内容工具和社交媒体 API 的命令行工具。

安装

npm install -g gnomic-cli

环境要求

  • Node.js >= 14.0.0

使用方法

gnomic <命令> [子命令] [选项]

命令

新闻 (news)

搜索和获取热门新闻。

# 按关键词搜索新闻
gnomic news search "你的关键词"

# 获取热门新闻
gnomic news hot

# 以文本格式输出(默认 JSON)
gnomic news search "AI" -f text
gnomic news hot -f text

内容工具 (content)

将 HTML 转换为可访问的 URL。

# 将 HTML 字符串转换为 URL
gnomic content html2url "<html>...</html>"

# 从文件读取 HTML 并转换
gnomic content html2url -i ./path/to/file.html

# 以文本格式输出
gnomic content html2url "<html>...</html>" -f text

社交媒体 (social)

获取抖音和小红书的数据。

# 获取抖音视频数据
gnomic social dy-video <视频链接>

# 读取小红书笔记
gnomic social xhs-note <笔记链接>

# 以文本格式输出
gnomic social dy-video <视频链接> -f text

选项

选项 说明 默认值
-f, --format <type> 输出格式(json 或 text) json
-i, --file <path> 从文件路径读取 HTML -
-V, --version 显示版本号 -
-h, --help 显示帮助信息 -

环境变量

在项目根目录创建 .env 文件来配置 API 设置:

API_BASE_URL=你的API地址

许可证

ISC

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors