peterfei/ai-agent-team / .claude/skills/softcopyright
softcopyright
Flagged智能软件著作权申请材料生成工具。自动分析项目源码,生成符合软著申请要求的软件说明书和源代码文档。支持关键词搜索、智能源码分析、格式化输出和PDF导出。
test-fixed-page-number.js
View on GitHub#!/usr/bin/env node
const path = require('path');
const scanner = require('./scripts/scanner');
const { generateManualHTML } = require('./scripts/simple-doc-generator');
const { exportSourceCodeHTML } = require('./scripts/html-source-exporter');
const fs = require('fs-extra');
const chalk = require('chalk');
async function testFixedPageNumber() {
try {
console.log(chalk.blue.bold('🔧 测试修复后的页眉页脚'));
console.log(chalk.gray('='.repeat(60)));
const projectPath = process.argv[2] || process.cwd();
const outputDir = process.argv[3] || path.join(process.cwd(), 'softcopyright-output');
await fs.ensureDir(outputDir);
console.log(chalk.yellow('🔍 扫描项目...'));
const projectInfo = await scanner.scanProject(projectPath);
console.log(chalk.yellow('\n📄 生成软件说明书(最终版)...'));
const manualPath = await generateManualHTML(projectInfo, outputDir);
console.log(chalk.green(`✅ ${path.basename(manualPath)}`));
console.log(chalk.yellow('\n📄 生成源代码文档(最终版)...'));
const sourcePath = await exportSourceCodeHTML(projectInfo, outputDir);
console.log(chalk.green(`✅ ${path.basename(sourcePath)}`));
console.log(chalk.blue.bold('\n🎉 生成完成!'));
console.log(chalk.cyan('\n✅ 修复内容:'));
console.log(chalk.white('• 页眉左上角:显示"软件名称_版本号"'));
console.log(chalk.white(' 例如:"AI智能体_V1.0.2"'));
console.log(chalk.white('• 页脚右下角:使用CSS counter自动显示"第 X 页"'));
console.log(chalk.white('• 页码会根据实际页数自动更新'));
console.log(chalk.white('• 移除了所有额外的时间和版权信息'));
console.log(chalk.cyan('\n🖨️ 验证方法:'));
console.log(chalk.white('1. 在浏览器中打开HTML文件'));
console.log(chalk.white('2. 按Cmd+P进入打印预览'));
console.log(chalk.white('3. 检查页眉是否显示"AI智能体_V1.0.2"'));
console.log(chalk.white('4. 检查每一页的页码是否正确递增'));
console.log(chalk.white('5. 第1页显示"第 1 页",第2页显示"第 2 页"...'));
console.log(chalk.cyan(`\n📁 输出目录: ${outputDir}`));
} catch (error) {
console.error(chalk.red('❌ 失败:'), error.message);
throw error;
}
}
testFixedPageNumber().then(() => {
console.log(chalk.green('\n✨ 完成!'));
}).catch(() => {
process.exit(1);
});Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |