← 返回
数据分析 Key 中文

Finance Report Analyzer

Analyze financial data from uploaded Excel/PDF files and generate interactive reports with sparkline trend charts. Supports output to PDF, DOCX, Markdown, an...
分析上传的Excel/PDF财务数据,生成包含迷你趋势图的交互式报告,支持导出为PDF、DOCX、Markdown等格式。
qiujiahong
数据分析 clawhub v1.2.0 1 版本 99089.7 Key: 需要
★ 2
Stars
📥 6,491
下载
💾 38
安装
1
版本
#latest

概述

Finance Report Analyzer

Generate financial analysis reports from uploaded Excel/PDF files with inline SVG sparkline trend charts and multi-format output.

Quick Start

python3 scripts/generate_report.py input.xlsx -o pdf --company "公司名" --ticker "000001.SZ"

Output Formats

-o flag controls output. HTML is always generated as the base; other formats convert from HTML.

FlagOutputRequires
------------------------
-o htmlHTML only(built-in)
-o pdfHTML + PDF (default)wkhtmltopdf or chromium
-o docHTML + DOCXpandoc
-o mdHTML + Markdownpandoc or markdownify

Workflow

Step 1: Acquire Data File

Try in order:

  1. Feishu chat file attachment — Download via API:

```bash

# Get token

TOKEN=$(curl -s -X POST 'https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal' \

-H 'Content-Type: application/json' \

-d '{"app_id":"APP_ID","app_secret":"APP_SECRET"}' | python3 -c "import json,sys; print(json.load(sys.stdin)['tenant_access_token'])")

# Get file_key from message

curl -s "https://open.feishu.cn/open-apis/im/v1/messages/{message_id}" -H "Authorization: Bearer $TOKEN"

# Download

curl -s "https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file" \

-H "Authorization: Bearer $TOKEN" -o /tmp/data.xlsx

```

Get app credentials: read channels.feishu.appId/appSecret from openclaw.json.

  1. Feishu Doc/Bitable link — Use feishu_doc/feishu_bitable tools
  2. Local file — Use directly
  3. Pasted text — Parse and save as xlsx

Step 2: Generate Report

python3 scripts/generate_report.py /tmp/data.xlsx -o pdf \
  --company "百济神州-U" --ticker "688235.SH" --output-dir /tmp/reports

Step 3: Web Search Enhancement (Optional)

Search for industry benchmarks:

web_search("{company} 行业对比 市场份额 {year}")

Step 4: Deliver File via Feishu API

The message tool may send paths as text. Use direct Feishu API to send real file messages:

# 1. Upload file to get file_key
UPLOAD=$(curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/files' \
  -H "Authorization: Bearer $TOKEN" \
  -F 'file_type=stream' \
  -F "file_name=report.html" \
  -F "file=@/path/to/report.html")
FILE_KEY=$(echo "$UPLOAD" | python3 -c "import json,sys; print(json.load(sys.stdin)['data']['file_key'])")

# 2. Send file message to chat
curl -s -X POST 'https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=chat_id' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d "{\"receive_id\":\"CHAT_ID\",\"msg_type\":\"file\",\"content\":\"{\\\"file_key\\\":\\\"$FILE_KEY\\\"}\"}"

Report Features

  • Sparkline trend charts: Each metric row has an inline SVG showing the trend (solid=actual, dashed=forecast)
  • Forecast markers: Predicted values marked with ⟡ symbol and yellow background
  • Color coding: Green=positive, Red=negative
  • Responsive: Works on mobile and desktop
  • Print-ready: CSS print styles included

Metric Definitions

See references/metrics.md for financial metric calculations.

版本历史

共 1 个版本

  • v1.2.0 当前
    2026-03-29 06:52 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

suspicious
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 64,855
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 162 📥 59,673
content-creation

AI Image Gen

qiujiahong
AI图像生成与编辑。支持文生图、图+文生图、风格转换。当用户要求画图、生成图片、编辑图片、图片风格转换时使用此 skill。支持多种比例(1:1、3:2、16:9、21:9 等)和分辨率(标准、2K、4K)。
★ 2 📥 7,669