Skip to content

Commit

Permalink
更新(小寒) (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
SaboZhang authored Jan 4, 2025
2 parents b09be38 + e2cae7b commit f6d7946
Show file tree
Hide file tree
Showing 25 changed files with 152 additions and 46 deletions.
19 changes: 12 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@

# 更新(元旦)
# 更新(小寒)

[更新下载](https://github.com/SaboZhang/EasyTidy/releases)

- 优化:修改自动化页面展示方式(用户可自行切换为卡片展示或者列表形式)
- 优化:屏幕较小的情况下dialog窗口内容无法显示全,并且无法进行上下滚动
- 优化:优化配置备份还原
- 修复:关闭窗口时,所有任务都会被停止的BUG
- 修复:取消自动处理的关联时,仍然会自动执行的BUG
- 优化:导航菜单显示 感谢@kat
- 优化:增加“介于”“不介于”条件的使用描述
- 优化:源目录允许用户手动输入路径(可以是文件/文件夹)
- 修复:某些情况下会发生间隔执行配置失败的问题 #56
- 禁用:加密功能需要优化,暂时不生效(下个版本恢复)

**Full Changelog**: <https://github.com/SaboZhang/EasyTidy/compare/1.1.0.1226...1.1.1.0101>
**网盘新增不包含winui跟.NET的版本,更新程序暂不支持更新不包含winui3AppSDK的版本**
**网盘中**EasyTidy_1.1.2.0105_win-x64_Lite 版本需要自行安装WindowsAppSDK 跟 .NET8 运行时

**Full Changelog**: <https://github.com/SaboZhang/EasyTidy/compare/1.1.0.1226...1.1.2.0105>

网盘下载:[123网盘](https://www.123684.com/s/hbzgTd-fmmt)|[蓝奏云(2025)](https://wwoo.lanzouu.com/b02u2ne0eh)
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
<p align="center">
<a href="https://github.com/SaboZhang/EasyTidy/blob/main/LICENSE" target="_self"></a>
<h1 align="center">EasyTidy</h1>
<p align="center">EasyTidy 一个简单的文件自动分类整理工具,轻松创建文件的自动工作流程
</p>

[**English**](./README_EN.md) | **简体中文**

# 文件整理程序
EasyTidy 是一款功能强大的文件管理软件。它能够自动处理和组织文件与文件夹,让你的文件系统变得井井有条。 特色功能包括: 强大的文件过滤:可以依据文件名称、所在目录、大小、日期、属性、内容或者常规表达式来筛选文件,精准定位你所需的文件。 灵活的执行模式:支持手动操作和自动执行。在自动执行方面,你可以设置延时启动,也可以按照固定的时间间隔执行,还能通过 CRON 表达式自定义执行周期,满足不同场景下的文件管理需求。

C# .net8 winui3 实现
使用技术:C# .net8 winui3 实现

TODO:

Expand Down
53 changes: 53 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<p align="center">
<a href="https://github.com/SaboZhang/EasyTidy" target="_blank">
<img align="center" alt="EasyTidy" width="140" src="src/EasyTidy/Assets/icon.png" />
</a>
</p>
<p align="center">
<a href="https://github.com/SaboZhang/EasyTidy/blob/main/LICENSE" target="_self"></a>
<h1 align="center">EasyTidy</h1>
<p align="center">EasyTidy A simple file auto-classification tool makes it easy to create automatic workflows with files
</p>

[**English**](./README_EN.md) | **简体中文**

EasyTidy is a powerful file management software. It can automatically process and organize files and folders, leaving your file system in an orderly manner. Features include: Powerful file filtering: You can filter files by file name, directory, size, date, attributes, content or regular expressions to accurately locate the files you need. Flexible execution mode: Supports manual operation and automatic execution. In terms of automatic execution, you can set a delay start, or you can execute it at fixed intervals, and you can also customize the execution cycle through the CRON expression to meet the file management needs in different scenarios.

Technology used: C# .net8 winui3 implementation

TODO:

1.界面设计

- [x] 常规页面设计
- [x] 过滤器界面 + 列表界面
- [x] 任务编排界面 + 列表界面
- [x] 自动化界面
- [x] 设置页面 + 多语言切换
- [x] 错误验证
- [ ] 本地化 国际化(暂未完全实现) 目前支持 简体中文、繁体中文、英文、日语、法语

2.功能实现

- [x] 添加过滤器
- [x] 添加编排任务 + 筛选
- [x] 选择已有分组
- [x] 任务关联过滤器
- [x] 系统托盘图标功能
- [x] 根据配置执行对应操作
- [ ] 备份还原 本地+WebDav (进行中) 已完成本地、webdav备份
- [x] 规则示例
- [x] 筛选器
- [x] 按计划执行
- [x] 定时执行

3.后续计划

- [x] 增加解压操作
- [x] 增加文件WebDav备份
- [x] 前端界面显示Log
- [ ] [#25](https://github.com/SaboZhang/EasyTidy/issues/25)相关问题 (已完成部分功能)
- [x] 移除WinUICommunity相关依赖,作者已停止维护
- [ ] 文件加密
- [ ] 完善文档内容
- [ ] 想到再添加吧!!!
4 changes: 2 additions & 2 deletions src/EasyTidy.Model/AppConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
namespace EasyTidy.Model;
public partial class AppConfig : JsonSettings, IVersionable
{
[EnforcedVersion("1.1.1.0101")]
public virtual Version Version { get; set; } = new Version(1, 1, 1, 0101);
[EnforcedVersion("1.1.2.0105")]
public virtual Version Version { get; set; } = new Version(1, 1, 2, 0105);

public override string FileName { get; set; } = Constants.AppConfigPath;

Expand Down
8 changes: 8 additions & 0 deletions src/EasyTidy.Service/FileActuator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ internal static async Task ProcessFileAsync(OperationParameters parameters)
break;
case OperationMode.Encryption:
// TODO: 加密文件
// await ExecuteEncryption(parameters.SourcePath, parameters.TargetPath, "123456");
break;
case OperationMode.HardLink:
CreateFileHardLink(parameters.SourcePath, parameters.TargetPath);
Expand Down Expand Up @@ -814,6 +815,13 @@ private static bool CreateHardLink(string hardLinkPath, string existingFilePath)
return result;
}

private static async Task ExecuteEncryption(string path, string target, string pass)
{

CryptoUtil.EncryptFile(path,target, pass);
await Task.CompletedTask;
}

/// <summary>
/// 检查文件夹是否为空
/// </summary>
Expand Down
5 changes: 5 additions & 0 deletions src/EasyTidy.Service/FileEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,11 @@ private static void OnFileChange(FileSystemEventArgs e, int delaySeconds, Action
/// <param name="parameter"></param>
private static void HandleFileChange(string path, OperationParameters parameter)
{
if (string.IsNullOrEmpty(parameter.SourcePath))
{
LogService.Logger.Warn("源文件夹为空,此次自动任务将退出执行");
return;
}
try
{
if (!IsPathUnderWatch(parameter.SourcePath, parameter.TargetPath)) return;
Expand Down
12 changes: 11 additions & 1 deletion src/EasyTidy.Service/OperationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,23 @@ await Task.Run(async () =>
{
await FileActuator.ExecuteFileOperationAsync(parameters);
});
LogService.Logger.Info("执行加密任务完成");
}

private static async Task CreateSoftLink(OperationParameters parameters)
{
await Task.Run(async () =>
{
await FileActuator.ExecuteFileOperationAsync(parameters);
if (parameters.RuleModel.RuleType == TaskRuleType.FileRule)
{
await FileActuator.ExecuteFileOperationAsync(parameters);
}
else
{
await FolderActuator.ExecuteFolderOperationAsync(parameters);
}
});
LogService.Logger.Info("执行软连接任务完成");
}

private static async Task CreateHandLink(OperationParameters parameters)
Expand All @@ -285,6 +294,7 @@ await Task.Run(async () =>
{
await FileActuator.ExecuteFileOperationAsync(parameters);
});
LogService.Logger.Info("执行硬连接任务完成");
}

}
2 changes: 1 addition & 1 deletion src/EasyTidy.Util/FilterUtil.Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ internal static bool CompareValues(long fileValue, long? filterValue, long? filt
ComparisonResult.GreaterThan => fileValue > filterValue,
ComparisonResult.LessThan => fileValue < filterValue,
ComparisonResult.Equal => fileValue == filterValue,
ComparisonResult.Between => fileValue > filterValue && fileValue < filterValueTwo,
ComparisonResult.Between => fileValue >= filterValue && fileValue <= filterValueTwo,
ComparisonResult.NotBetween => fileValue < filterValue || fileValue > filterValueTwo,
_ => false,
};
Expand Down
2 changes: 1 addition & 1 deletion src/EasyTidy/Activation/DefaultActivationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override bool CanHandleInternal(LaunchActivatedEventArgs args)

protected override async Task HandleInternalAsync(LaunchActivatedEventArgs args)
{
_navigationService.NavigateTo(typeof(FilterViewModel).FullName!, args.Arguments);
_navigationService.NavigateTo(typeof(TaskOrchestrationViewModel).FullName!, args.Arguments);

await Task.CompletedTask;
}
Expand Down
7 changes: 6 additions & 1 deletion src/EasyTidy/Common/Job/AutomaticJob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
using EasyTidy.Common.Database;
using EasyTidy.Model;
using EasyTidy.Service;
using EasyTidy.Util;
using Microsoft.EntityFrameworkCore;
using Quartz;

Expand All @@ -29,6 +28,12 @@ public async Task Execute(IJobExecutionContext context)
return;
}

if (string.IsNullOrEmpty(task.TaskSource))
{
Logger.Warn("源文件夹为空,此次自动任务将退出执行");
return;
}

var rule = await GetSpecialCasesRule(task.GroupName.Id, task.TaskRule);
var operationParameters = new OperationParameters(
operationMode: task.OperationMode,
Expand Down
3 changes: 2 additions & 1 deletion src/EasyTidy/EasyTidy.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PublishProfile>win-$(Platform).pubxml</PublishProfile>
<UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling>
<Version>1.1.1.0101</Version>
<Version>1.1.2.0105</Version>
<ImplicitUsings>true</ImplicitUsings>
<SuportedOSPlatformsVersion>10.0.22621.0</SuportedOSPlatformsVersion>
<WindowsSdkPackageVersion>10.0.22621.45</WindowsSdkPackageVersion>
Expand All @@ -23,6 +23,7 @@
<WindowsPackageType>None</WindowsPackageType>
<DefaultLanguage>en-Us</DefaultLanguage>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<PublishTrimmed>true</PublishTrimmed>
</PropertyGroup>
<PropertyGroup Label="MultilingualAppToolkit">
<MultilingualAppToolkitVersion>4.0</MultilingualAppToolkitVersion>
Expand Down
4 changes: 2 additions & 2 deletions src/EasyTidy/MultilingualResources/EasyTidy.fr-FR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
</trans-unit>
<trans-unit id="FilterSettingsControl.ModuleTitle" translate="yes" xml:space="preserve">
<source>Filter</source>
<target state="translated">Filtre</target>
<target state="translated">Avancé</target>
</trans-unit>
<trans-unit id="AtLeastOneWord" translate="yes" xml:space="preserve">
<source>At least one word</source>
Expand Down Expand Up @@ -1442,7 +1442,7 @@
</trans-unit>
<trans-unit id="NavFiltersText.Content" translate="yes" xml:space="preserve">
<source>Filters</source>
<target state="translated">Filters</target>
<target state="translated">Règles avancées</target>
</trans-unit>
<trans-unit id="NavGeneralText.Content" translate="yes" xml:space="preserve">
<source>General</source>
Expand Down
4 changes: 2 additions & 2 deletions src/EasyTidy/MultilingualResources/EasyTidy.ja-JP.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
</trans-unit>
<trans-unit id="FilterSettingsControl.ModuleTitle" translate="yes" xml:space="preserve">
<source>Filter</source>
<target state="translated">フィルタ</target>
<target state="translated">高級ルール</target>
</trans-unit>
<trans-unit id="AtLeastOneWord" translate="yes" xml:space="preserve">
<source>At least one word</source>
Expand Down Expand Up @@ -1442,7 +1442,7 @@
</trans-unit>
<trans-unit id="NavFiltersText.Content" translate="yes" xml:space="preserve">
<source>Filters</source>
<target state="translated">フィルタ</target>
<target state="translated">高級ルール</target>
</trans-unit>
<trans-unit id="NavGeneralText.Content" translate="yes" xml:space="preserve">
<source>General</source>
Expand Down
6 changes: 3 additions & 3 deletions src/EasyTidy/MultilingualResources/EasyTidy.zh-CN.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
</trans-unit>
<trans-unit id="FilterSettingsControl.ModuleTitle" translate="yes" xml:space="preserve">
<source>Filter</source>
<target state="translated">过滤器</target>
<target state="translated">高级规则</target>
</trans-unit>
<trans-unit id="AtLeastOneWord" translate="yes" xml:space="preserve">
<source>At least one word</source>
Expand Down Expand Up @@ -1430,11 +1430,11 @@
</trans-unit>
<trans-unit id="NavTaskOrchestrationText.Content" translate="yes" xml:space="preserve">
<source>Task Orchestration</source>
<target state="translated">任务编排</target>
<target state="translated">整理任务</target>
</trans-unit>
<trans-unit id="NavFiltersText.Content" translate="yes" xml:space="preserve">
<source>Filters</source>
<target state="translated">过滤规则</target>
<target state="translated">高级规则</target>
</trans-unit>
<trans-unit id="NavGeneralText.Content" translate="yes" xml:space="preserve">
<source>General</source>
Expand Down
2 changes: 1 addition & 1 deletion src/EasyTidy/MultilingualResources/EasyTidy.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@
</trans-unit>
<trans-unit id="NavFiltersText.Content" translate="yes" xml:space="preserve">
<source>Filters</source>
<target state="translated">過濾器</target>
<target state="translated">高級規則</target>
</trans-unit>
<trans-unit id="NavGeneralText.Content" translate="yes" xml:space="preserve">
<source>General</source>
Expand Down
2 changes: 1 addition & 1 deletion src/EasyTidy/MultilingualResources/EasyTidy.zh-TW.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,7 @@
</trans-unit>
<trans-unit id="NavFiltersText.Content" translate="yes" xml:space="preserve">
<source>Filters</source>
<target state="translated">過濾器</target>
<target state="translated">高級規則</target>
</trans-unit>
<trans-unit id="NavGeneralText.Content" translate="yes" xml:space="preserve">
<source>General</source>
Expand Down
4 changes: 2 additions & 2 deletions src/EasyTidy/Strings/fr-FR/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<value>Ajouter facilement des fichiers qui doivent être filtrés pour réaliser une gestion précise de fichiers spécifiques. En ajoutant des règles de traitement de fichiers, vous pouvez personnaliser la façon dont les fichiers sont traités pour répondre aux besoins individuels. Dans le même temps, vous pouvez également utiliser la fonction de correspondance de motifs puissante des expressions régulières pour affiner davantage la logique de filtrage et de traitement des fichiers, ce qui rend la gestion des fichiers plus efficace et intelligente. Que vous souhaitiez exclure des types spécifiques de fichiers ou effectuer un traitement spécial sur des fichiers qui correspondent aux modèles spécifiques, vous pouvez facilement le faire ici.</value>
</data>
<data name="FilterSettingsControl.ModuleTitle" xml:space="preserve">
<value>Filtre</value>
<value>Avancé</value>
</data>
<data name="AtLeastOneWord" xml:space="preserve">
<value>Au moins un mot</value>
Expand Down Expand Up @@ -1089,7 +1089,7 @@
<value>Orchestration des tâches</value>
</data>
<data name="NavFiltersText.Content" xml:space="preserve">
<value>Filters</value>
<value>Règles avancées</value>
</data>
<data name="NavGeneralText.Content" xml:space="preserve">
<value>Général</value>
Expand Down
4 changes: 2 additions & 2 deletions src/EasyTidy/Strings/ja-JP/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<value>特定のファイルを正確に管理するためにフィルタリングする必要があるファイルを簡単に追加できます。ファイル処理ルールを追加することで、個人のニーズに合わせてファイルの処理方法をカスタマイズできます。また、正規表現の強力なパターンマッチング機能を使用して、ファイルのフィルタリングと処理ロジックをさらに洗練することができ、ファイル管理をより効率的かつインテリジェントにすることができます。特定のタイプのファイルを除外する場合でも、特定のパターンに一致するファイルに対して特別な処理を実行する場合でも、ここで簡単に行うことができます。</value>
</data>
<data name="FilterSettingsControl.ModuleTitle" xml:space="preserve">
<value>フィルタ</value>
<value>高級ルール</value>
</data>
<data name="AtLeastOneWord" xml:space="preserve">
<value>少なくとも1文字</value>
Expand Down Expand Up @@ -1089,7 +1089,7 @@
<value>タスクオーケストレーション</value>
</data>
<data name="NavFiltersText.Content" xml:space="preserve">
<value>フィルタ</value>
<value>高級ルール</value>
</data>
<data name="NavGeneralText.Content" xml:space="preserve">
<value>概要</value>
Expand Down
6 changes: 3 additions & 3 deletions src/EasyTidy/Strings/zh-CN/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
<value>轻松地添加需要过滤的文件,实现对特定文件的精准管理。通过增加文件处理规则,你能够自定义文件的处理方式,满足个性化的需求。同时,还可以利用正则表达式强大的模式匹配功能,进一步细化文件的筛选和处理逻辑,让文件管理更加高效、智能。无论是排除特定类型的文件,还是对符合特定模式的文件进行特殊处理,都能在这里轻松实现。</value>
</data>
<data name="FilterSettingsControl.ModuleTitle" xml:space="preserve">
<value>过滤器</value>
<value>高级规则</value>
</data>
<data name="AtLeastOneWord" xml:space="preserve">
<value>至少一个单词</value>
Expand Down Expand Up @@ -1080,10 +1080,10 @@
<value>自动化</value>
</data>
<data name="NavTaskOrchestrationText.Content" xml:space="preserve">
<value>任务编排</value>
<value>整理任务</value>
</data>
<data name="NavFiltersText.Content" xml:space="preserve">
<value>过滤规则</value>
<value>高级规则</value>
</data>
<data name="NavGeneralText.Content" xml:space="preserve">
<value>常规</value>
Expand Down
2 changes: 1 addition & 1 deletion src/EasyTidy/Strings/zh-Hant/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@
<value>任務編排</value>
</data>
<data name="NavFiltersText.Content" xml:space="preserve">
<value>過濾器</value>
<value>高級規則</value>
</data>
<data name="NavGeneralText.Content" xml:space="preserve">
<value>常規</value>
Expand Down
2 changes: 1 addition & 1 deletion src/EasyTidy/Strings/zh-TW/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,7 @@
<value>任務編排</value>
</data>
<data name="NavFiltersText.Content" xml:space="preserve">
<value>過濾器</value>
<value>高級規則</value>
</data>
<data name="NavGeneralText.Content" xml:space="preserve">
<value>常規</value>
Expand Down
Loading

0 comments on commit f6d7946

Please sign in to comment.