From 2d528ac3da1e2970d4d1bf83e475c9682fa34cbd Mon Sep 17 00:00:00 2001 From: xiatianxuan Date: Sat, 10 Jan 2026 19:15:31 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E6=8F=90=E7=A4=BA=E8=AF=AD=E5=8D=87?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 8 ++++++-- sbackup/__init__.py | 14 ++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8669753..5545ad8 100644 --- a/README.md +++ b/README.md @@ -52,6 +52,12 @@ Sbackup all Sbackup save ``` +#### 查看版本信息 + +```powershell +Sbackup version +``` + ## 实现原理 Sbackup根据文件夹的最后修改日期决定是否备份. @@ -75,5 +81,3 @@ Sbackup根据文件夹的最后修改日期决定是否备份. ## 加入我们? 请发送邮件到:xiatianxuan2025@163.com - - diff --git a/sbackup/__init__.py b/sbackup/__init__.py index 15981b8..34ca299 100644 --- a/sbackup/__init__.py +++ b/sbackup/__init__.py @@ -1,15 +1,21 @@ from .auto_save import add_folder, rm_folder, save_folder, all_folder import sys -VERSION = "0.0.1" +VERSION = "1.0.0" +version_string = f""" +Sbackup v{VERSION} — Copyright © 2026 xiatianxuan +Licensed under GNU GPL v3.0 — https://www.gnu.org/licenses/gpl-3.0.html +""" help_string = f""" -version: {VERSION} +Sbackup v{VERSION} — Copyright © 2026 xiatianxuan +Licensed under GNU GPL v3.0 — https://www.gnu.org/licenses/gpl-3.0.html + 为你的文件夹保驾护航. - add 添加备份策略. rm, remove 删除备份策略. all 查看所有备份策略. save 备份所有文件夹. +version 查看版本信息. """ def run(): @@ -30,7 +36,7 @@ def run(): elif command == "save": save_folder() elif command == "version": - print(f"version: {VERSION}.") + print(version_string) elif command == "help": print(help_string) else: