SuperAPI AI Directory

copyright-assist

Office & productivity

View repository

Updated 10-16 01:19

About this skill

Software Copyright Application Assistance Skill

Task Objective

  • This skill is used to: assist in preparing software copyright application materials based on existing project resources
  • Capabilities include:
    • Source code extraction and formatting (60 pages of code meeting software copyright requirements)
    • Guidance on writing design specifications/user manuals/operation manuals
    • Resource completeness checks and missing item reminders
    • Manual template filling and format adjustment
  • Trigger conditions:
    • The user needs to apply for software copyright
    • The user already has project code, documents, or some materials
    • The user needs guidance on how to prepare software copyright application materials

Prerequisites

  • Dependency description:
    • The Python environment already includes the required standard libraries
    • Optional dependency: PyYAML (for configuration file management)
  • Non-standard file/folder preparation: none
  • Configuration file:config.yaml(optional, used for custom configuration parameters)

Operation Steps

Step 1: Resource collection and completeness check

Interactive inquiry: Ask the user to confirm that the following resources have been provided or can be provided:

  • Project source code (path:./src/ or another code directory)
  • Project documents (requirements documents, design documents, README, etc.)
  • Software operation screenshots (at least 10 are recommended, covering the main functions)
  • Basic information such as project name, version number, development tools, and technology stack

Resource completeness check: Call scripts/check_resources.py to check resource completeness:

python /workspace/projects/copyright-assist/scripts/check_resources.py --code-dir ./src --doc-dir ./docs --screenshot-dir ./screenshots

Missing resource reminder: Based on the check results, remind the user to collect missing resources:

  • Missing screenshots: remind the user to prepare system operation screenshots (recommended to include the login screen, main function modules, operation flow, etc.)
  • Missing documents: remind the user to prepare requirements documents or design documents
  • Incomplete code: remind the user to ensure that the main business logic code is included

Step 2: Select the manual type and prepare

Manual type selection: Ask the user to choose according to the software copyright application needs:

  • Design specification (focuses on software design ideas, architecture, and technical implementation)
  • User manual (focuses on user operation guide and function introduction)
  • Operation manual (focuses on detailed operation steps and usage instructions)

Manual writing guidance: Provide corresponding guidance according to the type selected by the user:

  • Design specification: refer to references/design-manual-guide.md

    • Core chapters: design overview, system architecture, functional module design, data structure design, interface design, algorithm design
    • Key points: technical implementation approach, architecture diagram, flowchart, design highlights
  • User manual: refer to references/user-manual-guide.md

    • Core chapters: software introduction, operating environment, installation guide, function introduction, operation flow, FAQs
    • Key points: combination of text and images, clear screenshots, detailed operation steps
  • Operation manual: Reference references/operation-manual-guide.md

    • Core chapters: System overview, environment configuration, feature details, operation guide, troubleshooting
    • Key point: Detailed operation steps, with a screenshot for each step

Step 3: Source code extraction and formatting

Call the code extraction script:

python /workspace/projects/copyright-assist/scripts/extract_source_code.py --code-dir ./src --output ./formatted_code.txt

Script functions (strictly comply with National Copyright Administration requirements):

  • Automatically determine the total number of lines and decide the extraction strategy:
    • Total code lines < 3000: submit all code in full
    • Total code lines ≥ 3000: extract the first 30 pages + last 30 pages
  • Force each page to be filled to 50 lines (including blank lines and comments)
  • Automatically fill blank pages with comments
  • Add page number markers (such as /* === 第1页 === */)
  • Preserve code structure and indentation
  • Support multi-version applications:--version 1.0.0 parameter

Code format requirements: Reference references/source-code-format.md

Configuration file: Can be customized via config.yaml parameters (such as ignored directories, file extensions, etc.)

Step 4: Generate the manual content

Based on the selected type and available resources, the agent will:

  • Analyze the project code and documents to extract key information
  • Write the content chapter by chapter according to the manual structure
  • Insert the screenshots provided by the user into the corresponding positions
  • Adjust the language expression to comply with software copyright application standards

Template usage:

Step 5: Page count and format check

Page count check:

  • Manual: usually required to be more than 60 pages
  • Source code: automatically determined based on the total number of code lines (full or 60 pages)
  • If the page count is insufficient, remind the user to add content or adjust the format

Format check:

  • Whether the screenshots are clear and have corresponding explanatory text
  • Whether the code format is standard and the comments are clear
  • Whether the document structure is complete and the chapters are coherent

Resource check: Run the detailed resource check tool:

python /workspace/projects/copyright-assist/scripts/check_resources.py --code-dir ./src --doc-dir ./docs --screenshot-dir ./screenshots --output report.json
  • Check the number of code lines and files
  • Check the number and resolution of screenshots
  • Provide detailed problem analysis and solutions
  • Generate a check report in JSON format

Step 6: Automatically package submission materials

Call the packaging script:

python /workspace/projects/copyright-assist/scripts/package_submission.py \
  --software-name "用户管理系统" \
  --version 1.0.0 \
  --manual ./用户说明书.pdf \
  --code ./formatted_code.txt \
  --output ./output

Script functions:

  • Automatically generate a ZIP package that complies with naming conventions (such as 用户管理系统_1.0.0.zip)
  • Rename files to the standard format (软件名称_版本号_说明书.pdf)
  • Generate a resource manifest file
  • Verify the integrity of the package structure
  • Check file size and code line count

Multi-version support:

  • Organize resource directories by version (such as screenshots/v1.0/, screenshots/v2.0/)
  • Package each version independently
  • The manual template includes a version field

Step 7: Output and delivery

Generate the final materials:

  • Source code file:./formatted_code.txt
  • Manual file:./<类型>_说明书.docx or .md
  • ZIP package:./软件名称_版本号.zip(including manual + code + manifest)
  • Check report:./report.json(resource check report)

Delivery confirmation:

  • Confirm whether the materials meet software copyright application requirements
  • Remind the user to supplement missing content (if needed)
  • Provide follow-up modification suggestions

Resource Index

Notes

  • The agent is responsible for content creation, structural planning, and interaction guidance, while scripts handle technical processing (code extraction, resource checking, packaging)
  • When writing specifications, make full use of the agent's content generation capabilities and avoid overusing scripts
  • Maintain interaction with the user throughout the process and promptly remind them to collect missing resources
  • Ensure the output materials comply with the specification requirements for software copyright applications
  • The number and quality of screenshots have a significant impact on the number of pages in the specification; users are advised to prepare sufficient screenshots in advance
  • Compliance: All scripts are implemented strictly in accordance with National Copyright Administration requirements (number of code lines, page count, format)
  • Configurability: Can be customized via config.yaml custom configuration parameters without modifying script code
  • Multiple versions: Supports independent application and management of multiple versions of the same software (V1.0, V2.0)
  • Logging system: All scripts use a unified logging system, providing detailed error information and solutions

Usage Examples

Example 1: Complete workflow (design specification)

User requirements:

  • The project code is located at ./myproject/src/
  • Some design documents already exist ./docs/design.md
  • Need to generate a design specification

Execution workflow:

  1. Check resource integrity
  2. Extract source code (first 30 pages + last 30 pages)
  3. Read the design documents and extract the design approach
  4. Generate content according to the design specification structure
  5. Generate ./设计说明书.md

Example 2: Supplement resources (user manual)

User requirements:

  • Code and some documents already exist
  • Missing runtime screenshots

Execution workflow:

  1. Check resources and find that screenshots are missing
  2. Remind the user to prepare system runtime screenshots (recommended scenarios include: login interface, main functional modules, data entry, query operations, report export, etc.; at least 2-3 screenshots per scenario)
  3. After the user supplements the screenshots, check again
  4. Generate the user manual

Example 3: Code extraction

User requirements:

  • Only need to extract the source code

Execution workflow:

python /workspace/projects/copyright-assist/scripts/extract_source_code.py --code-dir ./myproject/src --output ./code.txt

Generate ./code.txt, including formatted code (automatically decide full volume or 60 pages based on the total number of lines)

Example 4: Multi-version software copyright application

User requirements:

  • The same software needs to apply for two versions, V1.0 and V2.0

Execution process:

Step 1: Organize the resource directory by version

myproject/
├── src/                    # V1.0代码
├── src_v2/                 # V2.0代码
├── screenshots/
│   ├── v1.0/               # V1.0截图
│   └── v2.0/               # V2.0截图
└── docs/
    ├── v1.0/                # V1.0文档
    └── v2.0/                # V2.0文档

Step 2: Extract the V1.0 code

python /workspace/projects/copyright-assist/scripts/extract_source_code.py \
  --code-dir ./src --output ./code_v1.0.txt --version 1.0.0

Step 3: Extract the V2.0 code

python /workspace/projects/copyright-assist/scripts/extract_source_code.py \
  --code-dir ./src_v2 --output ./code_v2.0.txt --version 2.0.0

Step 4: Generate the V1.0 manual and the V2.0 manual

Step 5: Package separately

# 打包V1.0
python /workspace/projects/copyright-assist/scripts/package_submission.py \
  --software-name "用户管理系统" --version 1.0.0 \
  --manual ./V1.0_说明书.pdf --code ./code_v1.0.txt \
  --output ./output

# 打包V2.0
python /workspace/projects/copyright-assist/scripts/package_submission.py \
  --software-name "用户管理系统" --version 2.0.0 \
  --manual ./V2.0_说明书.pdf --code ./code_v2.0.txt \
  --output ./output

Generate ./output/用户管理系统_1.0.0.zip and ./output/用户管理系统_2.0.0.zip

Example 5: Complete process (including resource check and packaging)

Execution process:

# 1. 检查资源
python /workspace/projects/copyright-assist/scripts/check_resources.py \
  --code-dir ./src --doc-dir ./docs --screenshot-dir ./screenshots \
  --output report.json

# 2. 提取代码
python /workspace/projects/copyright-assist/scripts/extract_source_code.py \
  --code-dir ./src --output ./code.txt --version 1.0.0

# 3. 生成说明书(智能体完成)

# 4. 打包提交材料
python /workspace/projects/copyright-assist/scripts/package_submission.py \
  --software-name "用户管理系统" --version 1.0.0 \
  --manual ./用户说明书.pdf --code ./code.txt \
  --output ./output

Generate ./output/用户管理系统_1.0.0.zip, which can be directly used for software copyright application upload