开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
捐赠
捐赠前请先登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
3 Star 1 Fork 1

程序员晚枫/python4office.cn

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
文件
main
分支 (4)
main
hugo-migration
fluid
feature/astro-migration
main
分支 (4)
main
hugo-migration
fluid
feature/astro-migration
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
main
分支 (4)
main
hugo-migration
fluid
feature/astro-migration
python4office.cn
/
scripts
/
tutorial.html
python4office.cn
/
scripts
/
tutorial.html
tutorial.html 31.67 KB
一键复制 编辑 原始数据 按行查看 历史
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI办公Skill从入门到精通 - 完整教程</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
min-height: 100vh;
color: #e0e0e0;
line-height: 1.8;
}
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
/* Header */
.header {
text-align: center;
padding: 60px 20px;
background: linear-gradient(135deg, rgba(0,212,255,0.1) 0%, rgba(157,0,255,0.1) 100%);
border-radius: 20px;
margin-bottom: 40px;
border: 1px solid rgba(255,255,255,0.1);
}
.header h1 {
font-size: 3em;
background: linear-gradient(90deg, #00d4ff, #9d00ff);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 20px;
}
.header .subtitle {
font-size: 1.3em;
color: #a0a0a0;
margin-bottom: 30px;
}
.header .badge {
display: inline-block;
background: linear-gradient(90deg, #00d4ff, #9d00ff);
color: white;
padding: 10px 30px;
border-radius: 30px;
font-weight: bold;
font-size: 1.2em;
}
/* Course Stats */
.stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
margin-bottom: 40px;
}
.stat-card {
background: rgba(255,255,255,0.05);
padding: 30px;
border-radius: 15px;
text-align: center;
border: 1px solid rgba(255,255,255,0.1);
transition: transform 0.3s;
}
.stat-card:hover {
transform: translateY(-5px);
background: rgba(255,255,255,0.08);
}
.stat-card .number {
font-size: 2.5em;
font-weight: bold;
color: #00d4ff;
}
.stat-card .label {
color: #888;
margin-top: 10px;
}
/* Course Outline */
.outline {
background: rgba(255,255,255,0.03);
border-radius: 20px;
padding: 40px;
margin-bottom: 40px;
border: 1px solid rgba(255,255,255,0.1);
}
.outline h2 {
font-size: 2em;
margin-bottom: 30px;
color: #00d4ff;
display: flex;
align-items: center;
gap: 15px;
}
.chapter {
margin-bottom: 30px;
background: rgba(0,0,0,0.2);
border-radius: 15px;
overflow: hidden;
}
.chapter-header {
background: linear-gradient(90deg, rgba(0,212,255,0.2), rgba(157,0,255,0.2));
padding: 20px 25px;
cursor: pointer;
display: flex;
justify-content: space-between;
align-items: center;
transition: background 0.3s;
}
.chapter-header:hover {
background: linear-gradient(90deg, rgba(0,212,255,0.3), rgba(157,0,255,0.3));
}
.chapter-title {
font-size: 1.3em;
font-weight: bold;
}
.chapter-meta {
color: #888;
font-size: 0.9em;
}
.lesson-list {
padding: 20px 25px;
}
.lesson {
padding: 15px 20px;
margin-bottom: 10px;
background: rgba(255,255,255,0.03);
border-radius: 10px;
border-left: 3px solid #00d4ff;
transition: all 0.3s;
}
.lesson:hover {
background: rgba(255,255,255,0.06);
border-left-color: #9d00ff;
}
.lesson-number {
color: #00d4ff;
font-weight: bold;
margin-right: 10px;
}
.lesson-title {
color: #e0e0e0;
}
/* Content Section */
.content-section {
background: rgba(255,255,255,0.03);
border-radius: 20px;
padding: 40px;
margin-bottom: 40px;
border: 1px solid rgba(255,255,255,0.1);
}
.content-section h2 {
font-size: 2em;
margin-bottom: 30px;
color: #00d4ff;
padding-bottom: 15px;
border-bottom: 2px solid rgba(0,212,255,0.3);
}
.content-section h3 {
font-size: 1.5em;
margin: 30px 0 20px;
color: #9d00ff;
}
.content-section h4 {
font-size: 1.2em;
margin: 25px 0 15px;
color: #00d4ff;
}
.content-section p {
margin-bottom: 15px;
color: #c0c0c0;
}
.content-section ul, .content-section ol {
margin: 15px 0 15px 30px;
color: #c0c0c0;
}
.content-section li {
margin-bottom: 10px;
}
/* Code Blocks */
pre {
background: #1a1a2e;
padding: 20px;
border-radius: 10px;
overflow-x: auto;
margin: 20px 0;
border: 1px solid rgba(0,212,255,0.2);
}
code {
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
color: #00d4ff;
font-size: 0.95em;
}
pre code {
color: #e0e0e0;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background: rgba(0,0,0,0.2);
border-radius: 10px;
overflow: hidden;
}
th, td {
padding: 15px;
text-align: left;
border-bottom: 1px solid rgba(255,255,255,0.1);
}
th {
background: rgba(0,212,255,0.1);
color: #00d4ff;
font-weight: bold;
}
tr:hover {
background: rgba(255,255,255,0.03);
}
/* Highlight Box */
.highlight-box {
background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(157,0,255,0.1));
border-left: 4px solid #00d4ff;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
.highlight-box.warning {
border-left-color: #ff9800;
background: linear-gradient(135deg, rgba(255,152,0,0.1), rgba(255,87,34,0.1));
}
.highlight-box.success {
border-left-color: #4caf50;
background: linear-gradient(135deg, rgba(76,175,80,0.1), rgba(139,195,74,0.1));
}
/* CTA Button */
.cta-section {
text-align: center;
padding: 60px 20px;
background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(157,0,255,0.1));
border-radius: 20px;
margin-top: 40px;
}
.cta-button {
display: inline-block;
background: linear-gradient(90deg, #00d4ff, #9d00ff);
color: white;
padding: 20px 50px;
border-radius: 50px;
font-size: 1.3em;
font-weight: bold;
text-decoration: none;
transition: transform 0.3s, box-shadow 0.3s;
box-shadow: 0 10px 30px rgba(0,212,255,0.3);
}
.cta-button:hover {
transform: translateY(-3px);
box-shadow: 0 15px 40px rgba(0,212,255,0.4);
}
/* Footer */
.footer {
text-align: center;
padding: 40px;
color: #666;
border-top: 1px solid rgba(255,255,255,0.1);
margin-top: 40px;
}
/* Navigation */
.nav-tabs {
display: flex;
gap: 10px;
margin-bottom: 30px;
flex-wrap: wrap;
}
.nav-tab {
padding: 10px 20px;
background: rgba(255,255,255,0.05);
border: 1px solid rgba(255,255,255,0.1);
border-radius: 25px;
cursor: pointer;
transition: all 0.3s;
color: #888;
}
.nav-tab:hover, .nav-tab.active {
background: linear-gradient(90deg, #00d4ff, #9d00ff);
color: white;
border-color: transparent;
}
/* Lesson Content */
.lesson-content {
display: none;
}
.lesson-content.active {
display: block;
}
/* Responsive */
@media (max-width: 768px) {
.header h1 {
font-size: 2em;
}
.outline, .content-section {
padding: 20px;
}
.chapter-header {
flex-direction: column;
gap: 10px;
text-align: center;
}
}
</style>
</head>
<body>
<div class="container">
<!-- Header -->
<div class="header">
<h1>🚀 AI办公Skill从入门到精通</h1>
<p class="subtitle">零基础掌握AI Skill开发,打造属于你的智能办公助手</p>
<span class="badge">💰 限时特惠 49円</span>
</div>
<!-- Stats -->
<div class="stats">
<div class="stat-card">
<div class="number">32</div>
<div class="label">节系统课程</div>
</div>
<div class="stat-card">
<div class="number">8</div>
<div class="label">大核心章节</div>
</div>
<div class="stat-card">
<div class="number">3</div>
<div class="label">主流平台覆盖</div>
</div>
<div class="stat-card">
<div class="number">2</div>
<div class="label">完整实战项目</div>
</div>
</div>
<!-- Course Outline -->
<div class="outline">
<h2>📚 课程大纲</h2>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第1章:入门基础</span>
<span class="chapter-meta">第1-2讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第1讲</span>
<span class="lesson-title">课程介绍与学习路线图</span>
</div>
<div class="lesson">
<span class="lesson-number">第2讲</span>
<span class="lesson-title">AI Skill 生态概览:Coze、OpenClaw、飞书 CLI</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第2章:核心概念</span>
<span class="chapter-meta">第3-5讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第3讲</span>
<span class="lesson-title">Skill 的核心概念:Intent、Action、Tool</span>
</div>
<div class="lesson">
<span class="lesson-number">第4讲</span>
<span class="lesson-title">你的第一个 Skill:Hello World 实战</span>
</div>
<div class="lesson">
<span class="lesson-number">第5讲</span>
<span class="lesson-title">Skill 的交互设计:让对话更自然</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第3章:平台实践</span>
<span class="chapter-meta">第6-11讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第6讲</span>
<span class="lesson-title">Coze 扣子平台深度解析</span>
</div>
<div class="lesson">
<span class="lesson-number">第7讲</span>
<span class="lesson-title">Coze 工作流与插件开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第8讲</span>
<span class="lesson-title">OpenClaw 平台实战</span>
</div>
<div class="lesson">
<span class="lesson-number">第9讲</span>
<span class="lesson-title">OpenClaw MCP 协议详解</span>
</div>
<div class="lesson">
<span class="lesson-number">第10讲</span>
<span class="lesson-title">飞书 CLI Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第11讲</span>
<span class="lesson-title">平台对比与选型指南</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第4章:办公场景实战</span>
<span class="chapter-meta">第12-17讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第12讲</span>
<span class="lesson-title">Excel 自动化 Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第13讲</span>
<span class="lesson-title">PDF 智能处理 Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第14讲</span>
<span class="lesson-title">PPT 智能生成 Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第15讲</span>
<span class="lesson-title">Word 文档处理 Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第16讲</span>
<span class="lesson-title">OCR 文字识别 Skill 开发</span>
</div>
<div class="lesson">
<span class="lesson-number">第17讲</span>
<span class="lesson-title">邮件自动化 Skill 开发</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第5章:进阶开发技巧</span>
<span class="chapter-meta">第18-21讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第18讲</span>
<span class="lesson-title">多平台 Skill 适配与迁移</span>
</div>
<div class="lesson">
<span class="lesson-number">第19讲</span>
<span class="lesson-title">数据持久化与状态管理</span>
</div>
<div class="lesson">
<span class="lesson-number">第20讲</span>
<span class="lesson-title">安全与权限管理</span>
</div>
<div class="lesson">
<span class="lesson-number">第21讲</span>
<span class="lesson-title">性能优化与监控</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第6章:综合项目实战</span>
<span class="chapter-meta">第22-26讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第22讲</span>
<span class="lesson-title">项目一:财务智能助手 - 需求分析</span>
</div>
<div class="lesson">
<span class="lesson-number">第23讲</span>
<span class="lesson-title">项目一:财务智能助手 - 开发实现</span>
</div>
<div class="lesson">
<span class="lesson-number">第24讲</span>
<span class="lesson-title">项目二:HR智能助手 - 需求分析</span>
</div>
<div class="lesson">
<span class="lesson-number">第25讲</span>
<span class="lesson-title">项目二:HR智能助手 - 开发实现</span>
</div>
<div class="lesson">
<span class="lesson-number">第26讲</span>
<span class="lesson-title">项目实战回顾与总结</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第7章:部署与运营</span>
<span class="chapter-meta">第27-29讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第27讲</span>
<span class="lesson-title">Skill 测试与质量保证</span>
</div>
<div class="lesson">
<span class="lesson-number">第28讲</span>
<span class="lesson-title">Skill 部署与发布</span>
</div>
<div class="lesson">
<span class="lesson-number">第29讲</span>
<span class="lesson-title">用户反馈与迭代优化</span>
</div>
</div>
</div>
<div class="chapter">
<div class="chapter-header">
<span class="chapter-title">第8章:变现与商业化</span>
<span class="chapter-meta">第30-32讲</span>
</div>
<div class="lesson-list">
<div class="lesson">
<span class="lesson-number">第30讲</span>
<span class="lesson-title">商业模式与变现策略</span>
</div>
<div class="lesson">
<span class="lesson-number">第31讲</span>
<span class="lesson-title">品牌建设与推广</span>
</div>
<div class="lesson">
<span class="lesson-number">第32讲</span>
<span class="lesson-title">课程总结与学习路线图</span>
</div>
</div>
</div>
</div>
<!-- Sample Content -->
<div class="content-section">
<h2>🎯 第3讲:Skill 的核心概念</h2>
<h3>一、Skill 的架构模型</h3>
<h4>1.1 一个完整的 Skill 交互流程</h4>
<pre><code>用户输入: "把这份 PDF 转成 Word 文档"
[Intent 识别] → 意图:文件格式转换
[参数提取] → source: PDF, target: Word, file: xxx.pdf
[Tool 选择] → 调用 PDF 解析工具 + Word 生成工具
[Action 执行] → 读取 PDF → 提取内容 → 生成 Word → 保存
[结果返回] → "转换完成,下载链接:xxx"</code></pre>
<h4>1.2 三大核心概念</h4>
<table>
<tr>
<th>概念</th>
<th>英文</th>
<th>作用</th>
<th>类比</th>
</tr>
<tr>
<td><strong>意图</strong></td>
<td>Intent</td>
<td>理解用户想做什么</td>
<td>大脑的想法</td>
</tr>
<tr>
<td><strong>动作</strong></td>
<td>Action</td>
<td>执行具体的操作</td>
<td>手的行为</td>
</tr>
<tr>
<td><strong>工具</strong></td>
<td>Tool</td>
<td>提供能力的外部资源</td>
<td>手中的工具</td>
</tr>
</table>
<h3>二、Intent(意图):Skill 的"大脑"</h3>
<p><strong>Intent</strong> 是用户输入的语义理解结果,告诉 Skill "用户想要什么"。</p>
<div class="highlight-box">
<strong>示例:</strong><br>
用户说:"帮我合并这两个 Excel 文件" / "把表格合一下" / "这两个 Excel 能整合吗"<br><br>
Intent 识别结果:<br>
<code>{"intent": "file_merge", "confidence": 0.95, "entities": {"file_type": "excel", "action": "merge", "count": 2}}</code>
</div>
<h3>三、Action(动作):Skill 的"手"</h3>
<p><strong>Action</strong> 是 Skill 执行的具体操作,是连接 Intent 和 Tool 的桥梁。</p>
<pre><code>class Action:
def __init__(self, name, parameters, tool):
self.name = name # 动作名称
self.parameters = parameters # 输入参数
self.tool = tool # 使用的工具
self.output = None # 执行结果
def execute(self):
"""执行动作"""
self.output = self.tool.run(self.parameters)
return self.output</code></pre>
<h3>四、Tool(工具):Skill 的"武器库"</h3>
<p><strong>Tool</strong> 是 Skill 可调用的外部能力,可以是代码库、API、服务等。</p>
<div class="highlight-box success">
<strong>Tool 的特点:</strong>
<ul>
<li>🔧 <strong>功能单一</strong>:每个 Tool 只做一件事</li>
<li>📦 <strong>可复用</strong>:多个 Skill 可以共用同一个 Tool</li>
<li>🔌 <strong>可扩展</strong>:随时添加新的 Tool</li>
<li>📖 <strong>自描述</strong>:Tool 自带功能说明</li>
</ul>
</div>
</div>
<div class="content-section">
<h2>🚀 第4讲:你的第一个 Skill</h2>
<h3>一、准备工作</h3>
<h4>1.1 注册 Coze 账号</h4>
<ol>
<li>访问 <a href="https://www.coze.cn" style="color: #00d4ff;">https://www.coze.cn</a></li>
<li>使用手机号或抖音账号注册</li>
<li>完成实名认证(如需发布到商店)</li>
</ol>
<h3>二、创建第一个 Skill:天气查询助手</h3>
<h4>2.1 配置人设与回复逻辑</h4>
<pre><code># 角色
你是一个专业的天气查询助手,能够准确回答用户关于天气的各种问题。
## 技能
- 查询指定城市的实时天气
- 查询未来 3 天的天气预报
- 提供穿衣、出行建议
## 限制
- 只能查询中国城市的天气
- 如果用户没有指定城市,询问用户所在城市
- 使用中文回复,语气友好亲切</code></pre>
<h4>2.2 核心代码实现</h4>
<pre><code>class WeatherSkill:
"""天气查询 Skill"""
def __init__(self):
self.intent_classifier = IntentClassifier()
self.weather_api = WeatherAPI()
self.advisor = Advisor()
def run(self, user_input: str) -> str:
"""主入口"""
# 1. 识别意图
intent = self.intent_classifier.classify(user_input)
if intent['intent'] != 'query_weather':
return "我可以帮你查询天气,请告诉我你想查哪个城市?"
# 2. 提取城市
city = intent.get('entities', {}).get('city')
if not city:
return "请告诉我你想查询哪个城市的天气?"
# 3. 查询天气
weather_data = self.weather_api.get_weather(city)
# 4. 生成建议
advice = self.advisor.generate(weather_data)
# 5. 组装回复
return self.format_response(weather_data, advice)</code></pre>
</div>
<div class="content-section">
<h2>📊 第12讲:Excel 自动化 Skill</h2>
<h3>一、场景分析</h3>
<h4>1.1 用户痛点</h4>
<ul>
<li><strong>数据清洗痛苦</strong>:从各部门收集的数据格式不统一,需要手动整理</li>
<li><strong>报表制作繁琐</strong>:每周/每月需要重复制作相同格式的报表</li>
<li><strong>格式转换困难</strong>:需要将 Excel 转换为 PDF、CSV 等其他格式</li>
<li><strong>数据合并复杂</strong>:多个表格需要按条件合并</li>
<li><strong>批量处理低效</strong>:几百个文件需要统一修改格式</li>
</ul>
<h3>二、核心功能设计</h3>
<pre><code>📊 Excel 智能助手
├── 数据清洗
│ ├── 去除重复行
│ ├── 填充空值
│ ├── 格式统一化
│ └── 异常数据标记
├── 报表生成
│ ├── 数据透视表
│ ├── 图表生成
│ └── 自动汇总
├── 格式转换
│ ├── Excel ↔ CSV
│ ├── Excel ↔ PDF
│ └── 批量转换
└── 数据合并
├── 多表合并
├── 按条件汇总
└── 差异报告</code></pre>
<h3>三、技术实现</h3>
<h4>3.1 技术选型</h4>
<table>
<tr>
<th>平台</th>
<th>技术方案</th>
<th>特点</th>
</tr>
<tr>
<td>Coze</td>
<td>Python + openpyxl/xlrd</td>
<td>功能全面,支持复杂操作</td>
</tr>
<tr>
<td>OpenClaw</td>
<td>Python + pandas</td>
<td>数据处理能力强</td>
</tr>
<tr>
<td>飞书 CLI</td>
<td>飞书表格 API</td>
<td>与飞书生态深度集成</td>
</tr>
</table>
</div>
<div class="content-section">
<h2>📄 第13讲:PDF 智能处理 Skill</h2>
<h3>一、核心功能架构</h3>
<pre><code>📄 PDF 智能助手
├── 内容提取
│ ├── 文字提取
│ ├── 表格提取
│ ├── 图片提取
│ └── 元数据读取
├── 格式转换
│ ├── PDF → Word
│ ├── PDF → Excel
│ └── PDF → 图片
├── 文档操作
│ ├── 合并 PDF
│ ├── 拆分 PDF
│ └── 旋转页面
└── 文档保护
├── 添加水印
├── 加密保护
└── 权限设置</code></pre>
<h3>二、技术选型</h3>
<table>
<tr>
<th>功能</th>
<th>Python 库</th>
<th>说明</th>
</tr>
<tr>
<td>基础操作</td>
<td>PyPDF2 / pypdf</td>
<td>合并、拆分、旋转</td>
</tr>
<tr>
<td>内容提取</td>
<td>pdfplumber / PyMuPDF</td>
<td>文字、表格提取</td>
</tr>
<tr>
<td>格式转换</td>
<td>pdf2docx / pdf2image</td>
<td>转 Word/图片</td>
</tr>
<tr>
<td>OCR 识别</td>
<td>pytesseract + pdf2image</td>
<td>扫描件识别</td>
</tr>
</table>
<h3>三、代码示例</h3>
<h4>PDF 合并功能</h4>
<pre><code>from pypdf import PdfReader, PdfWriter
import os
def merge_pdfs(file_list, output_path):
"""
合并多个 PDF 文件
Args:
file_list: PDF 文件路径列表
output_path: 输出文件路径
"""
writer = PdfWriter()
for file_path in file_list:
reader = PdfReader(file_path)
for page in reader.pages:
writer.add_page(page)
with open(output_path, 'wb') as output_file:
writer.write(output_file)
return output_path</code></pre>
</div>
<!-- CTA Section -->
<div class="cta-section">
<h2 style="margin-bottom: 20px; color: white;">🎓 开启你的 AI Skill 之旅</h2>
<p style="margin-bottom: 30px; color: #aaa;">32节系统课程,从入门到精通,打造属于你的智能办公助手</p>
<a href="#" class="cta-button">立即加入学习 49円</a>
<p style="margin-top: 20px; color: #666; font-size: 0.9em;">加入AI编程学习交流群,与10000+学员一起成长</p>
</div>
<!-- Footer -->
<div class="footer">
<p>© 2026 程序员晚枫 | python4office.cn</p>
<p style="margin-top: 10px;">用 Python,让工作更简单;用 AI,让未来更自由</p>
</div>
</div>
</body>
</html>
Loading...
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

个人网站的源代码:www.python4office.cn
暂无标签
Apache-2.0
使用 Apache-2.0 开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/CoderWanFeng/python4office.cn.git
git@gitee.com:CoderWanFeng/python4office.cn.git
CoderWanFeng
python4office.cn
python4office.cn
main
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /