Skip to content

Create Project Templates #25

@FerdinandSu

Description

@FerdinandSu

Description / 功能描述

English:
Create project templates to help developers quickly scaffold MobileSuit applications. Templates should cover common use cases and demonstrate best practices.

中文:
创建项目模板以帮助开发者快速搭建MobileSuit应用程序。模板应涵盖常见用例并展示最佳实践。

Features / 功能特性

English:

  • Basic Console App template (minimal setup)
  • CLI Tool template (argument parsing focus)
  • Interactive App template (menus and selections)
  • Async/Background Tasks template
  • Multi-language (I18N) template
  • Template initialization tool or script

中文:

  • 基础控制台应用模板(最小化设置)
  • CLI工具模板(专注参数解析)
  • 交互式应用模板(菜单和选择)
  • 异步/后台任务模板
  • 多语言(I18N)模板
  • 模板初始化工具或脚本

Template Examples / 模板示例

English:

# Using cookiecutter
cookiecutter gh:HIT-ReFreSH/PyMobileSuit-templates

# Or built-in command
python -m mobilesuit init --template basic

# Or simple script
python create_app.py my_app --template cli-tool

中文:

# 使用cookiecutter
cookiecutter gh:HIT-ReFreSH/PyMobileSuit-templates

# 或内置命令
python -m mobilesuit init --template basic

# 或简单脚本
python create_app.py my_app --template cli-tool

Tech Stack / 技术栈

  • Cookiecutter for template engine / 使用Cookiecutter作为模板引擎
  • Or simple Python script with shutil / 或使用 shutil 的简单Python脚本
  • Include requirements.txt in each template / 每个模板包含 requirements.txt

Difficulty & Time / 难度与时间

Difficulty / 难度: 🟢 Easy / 简单
Estimated Time / 预估时间: 3-5 days / 3-5天

Requirements / 要求

English:

  • MUST create at least 3 templates: Basic, CLI Tool, Interactive
  • Each template MUST include:
    • Complete working application
    • README with usage instructions
    • Example commands demonstrating features
    • Comments explaining key concepts
    • Unit tests
  • SHOULD support both Cookiecutter and simple script initialization
  • PR MUST include:
    • All template files
    • Documentation for each template
    • Screenshots of generated apps
    • Testing on fresh Python environment

中文:

  • 必须 创建至少3个模板:基础、CLI工具、交互式
  • 每个模板 必须 包含:
    • 完整的可工作应用程序
    • 带使用说明的README
    • 演示功能的示例命令
    • 解释关键概念的注释
    • 单元测试
  • 应该 同时支持Cookiecutter和简单脚本初始化
  • PR 必须 包含:
    • 所有模板文件
    • 每个模板的文档
    • 生成应用的截图
    • 在全新Python环境中的测试

Acceptance Criteria / 验收标准

  • Create "Basic Console App" template / 创建基础控制台应用模板
  • Create "CLI Tool" template / 创建CLI工具模板
  • Create "Interactive App" template / 创建交互式应用模板
  • Each template has README.md / 每个模板都有README.md
  • Each template has working example commands / 每个模板都有可工作的示例命令
  • Each template has unit tests / 每个模板都有单元测试
  • Implement initialization script / 实现初始化脚本
  • Test templates on Windows, macOS, Linux / 在各平台测试模板
  • Add templates to main documentation / 将模板添加到主文档
  • Create templates/ directory in repo or separate repo / 在仓库中创建templates/目录或独立仓库
  • Add screenshots to README / 向README添加截图

Before Starting / 开始之前

Please comment on this issue to let us know you're working on it!
请在此issue下评论,让我们知道你正在处理!

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestgood-first-issueGood for newcomerstoolingDevelopment tools and utilities

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions