Skip to content

Commit

Permalink
fix: 更新版本号至 2025.01.02.2300,并调整参数传递方式 (#29)
Browse files Browse the repository at this point in the history
* fix: 更新版本号至 2025.01.02.2300,并调整参数传递方式

fix DuckDuckStudio/Fufu_Tools#97
Replace branch fft-issue-97 's changes
Add pip dep(s) version update

* fix: 补全调用程序

Merge branch fft-issue-97 's change(s)

* Squashed commit of the following:

commit 85e61b6
Merge: 11e688d 5a354c9
Author: 鸭鸭「カモ」 <[email protected]>
Date:   Thu Jan 2 23:00:26 2025 +0800

    Merge branch 'develop-fft97' into save-temp-20241104

commit 11e688d
Merge: 7ef5152 971e840
Author: 宁静致远 <[email protected]>
Date:   Mon Nov 4 19:01:37 2024 +0800

    Merge pull request #26 from DuckDuckStudio/main

    [Auto] Sync changes to branch `save-temp-20241104`

commit 7ef5152
Author: 鸭鸭「カモ」 <[email protected]>
Date:   Mon Nov 4 16:46:35 2024 +0800

    [Save] 保存工作进度
  • Loading branch information
DuckDuckStudio authored Jan 2, 2025
1 parent d1bcfe0 commit 310b443
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 110 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
6 changes: 3 additions & 3 deletions pack.iss
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[Setup]
AppName=芙芙工具箱开发工具包
AppVersion=2024.11.27.2000
VersionInfoVersion=2024.11.27.2000
AppVersion=2025.01.02.2300
VersionInfoVersion=2025.01.02.2300
AppPublisher=DuckStudio
VersionInfoCopyright=Copyright (c) 鸭鸭「カモ」
AppPublisherURL=https://duckduckstudio.github.io/yazicbs.github.io/
DefaultDirName={autopf}\Fufu_Dev_Tools
DefaultGroupName=芙芙工具箱开发工具包
UninstallDisplayIcon={app}\Script\ffdev.exe
OutputDir=构建文件
OutputBaseFilename=Fufu_Dev_Tools_Setup_2024.11.27.2000
OutputBaseFilename=Fufu_Dev_Tools_Setup_2025.01.02.2300
SetupIconFile=Fufu_Tools\ico.ico
LicenseFile=LICENSE-GBK
Compression=lzma2
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
colorama
configparser
plyer
chardet
colorama==0.4.6
configparser==7.1.0
plyer==2.1.0
chardet==5.2.0
6 changes: 4 additions & 2 deletions 开发工具-打包/Script/ffdev.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from colorama import init, Fore
init(autoreset=True)

version = "2024.11.27.2000"
version = "2025.01.02.2300"

def main():
if len(sys.argv) < 2:
Expand All @@ -20,12 +20,14 @@ def main():
"参数查重": "代码校对/参数查重.exe",
"非UTF-8编码": "代码校对/非UTF-8编码.exe",
"尾随空格": "代码校对/尾随空格.exe",
"末尾空行": "代码校对/末尾空行.exe",
"需求生成": "生成工具/需求生成.exe",
"代码行数": "统计/代码总行数.exe",
"账号切换": "git/账号切换.exe",
"连续push": "git/连续push尝试.exe",
"连续pull": "git/连续pull尝试.exe",
"git连续尝试": "git/git连续尝试.exe"
"git连续尝试": "git/git连续尝试.exe",
"目录复制": "目录复制.exe"
}

if program in ["ver", "版本", "version", "Version", "--version", "--ver", "-v"]:
Expand Down
8 changes: 6 additions & 2 deletions 开发工具-打包/代码校对/末尾空行.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ def check_files(directory):
with open(filepath, 'rb') as file:
rawdata = file.read()
# 使用 chardet 库自动检测文件编码
result = chardet.detect(rawdata)
encoding = result['encoding']
try:
result = chardet.detect(rawdata)
encoding = result['encoding']
except Exception as e:
encoding = "utf-8"
print(f"{Fore.YELLOW}{Fore.RESET} 无法检测文件 {Fore.BLUE}{filepath}{Fore.RESET} 的编码,将默认使用 UTF-8\n{Fore.YELLOW}{Fore.RESET} {Fore.RED}{e}{Fore.RESET}")
with open(filepath, 'r', encoding=encoding) as decoded_file:
for line in decoded_file:
last_line = line
Expand Down
81 changes: 0 additions & 81 deletions 开发工具-打包/总调用.py

This file was deleted.

38 changes: 20 additions & 18 deletions 开发工具-源码/Script/ffdev.ps1
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
param(
[string]$program,
[string]$command,
[string[]]$inputArgs
[string]$tool,
[Parameter(ValueFromRemainingArguments=$true)]
[string[]]$Args
)

$parentDir = Split-Path -Path $PSScriptRoot -Parent
$version = "2024.11.27.2000"
$version = "2025.01.02.2300"
$flag = 0

if ($program -eq "总调用") {
if ($tool -eq "总调用") {
$pythonScript = Join-Path $parentDir "总调用.py"
} elseif ($program -eq "目录复制") {
$pythonScript = Join-Path $parentDir "目录复制.py"
} elseif ($program -eq "参数查重") {
} elseif ($tool -eq "目录复制") {
$pythonScript = Join-Path $parentDir "目录复制.pyw"
} elseif ($tool -eq "参数查重") {
$pythonScript = Join-Path $parentDir "代码校对\参数查重.py"
} elseif ($program -eq "非UTF-8编码") {
} elseif ($tool -eq "非UTF-8编码") {
$pythonScript = Join-Path $parentDir "代码校对\非UTF-8编码.py"
} elseif ($program -eq "尾随空格") {
} elseif ($tool -eq "尾随空格") {
$pythonScript = Join-Path $parentDir "代码校对\尾随空格.py"
} elseif ($program -eq "需求生成") {
} elseif ($tool -eq "末尾空行") {
$pythonScript = Join-Path $parentDir "代码校对\末尾空行.py"
} elseif ($tool -eq "需求生成") {
$pythonScript = Join-Path $parentDir "生成工具\需求生成.py"
} elseif ($program -eq "代码行数") {
} elseif ($tool -eq "代码行数") {
$pythonScript = Join-Path $parentDir "统计\代码总行数.py"
} elseif ($program -eq "账号切换") {
} elseif ($tool -eq "账号切换") {
$pythonScript = Join-Path $parentDir "git\账号切换.py"
} elseif ($program -eq "连续push") {
} elseif ($tool -eq "连续push") {
$pythonScript = Join-Path $parentDir "git\连续push尝试.py"
} elseif ($program -eq "连续pull") {
} elseif ($tool -eq "连续pull") {
$pythonScript = Join-Path $parentDir "git\连续pull尝试.py"
} elseif ($program -eq "git连续尝试") {
} elseif ($tool -eq "git连续尝试") {
$pythonScript = Join-Path $parentDir "git\git连续尝试.py"
} elseif ($program -in "ver", "版本", "version", "Version", "--version", "--ver", "-v") {
} elseif ($tool -in "ver", "版本", "version", "Version", "--version", "--ver", "-v") {
Write-Output "版本: $version"
Write-Output "安装在: $parentDir"
$flag = 1
Expand All @@ -41,5 +43,5 @@ if ($program -eq "总调用") {
}

if ($flag -ne 1) {
python $pythonScript $command $inputArgs
python $pythonScript $Args
}

0 comments on commit 310b443

Please sign in to comment.