banner
[面包]MrTwoC

[面包]MrTwoC

你好,欢迎来到这个基于区块链的个人博客 名字:面包 / MrTwoc 爱好:跑步(5/10KM)、拿铁咖啡、游戏(Minecraft、Warframe、CS) 兴趣方向:Rust、区块链、图形学、游戏设计与开发
bilibili
steam
email
github

[3]. Todo-rs Beautified Output

image

image

Project address: https://github.com/MrTwoc/todo-rs
In the second article, I tried a table library and found it incompatible with the owo_color library, so I skipped the table library and used owo_color directly in the console with the println! method.

At the same time, I implemented logging functionality using the tracing library and its dependencies, which can record what commands the user has executed; this is currently just a preliminary implementation.

The unicode-width and textwrap libraries helped me align the content in the terminal.

Currently Implemented Features#

Basic operations on task data [Create, Read, Update, Delete]. The fields currently included in the task are:

ID, Task Name, Task Description, Due Date, Task Status, Task Group, Task Value.

Logging functionality: Records the successful execution of commands relying on the tracing library. It can specify what command was executed at what time.

Extended operations: Batch status updates and deletions, such as completing or deleting tasks in bulk, and changing the status of multiple tasks with a single command.

Output beautification: The owo_colors library and emoji symbols can achieve the current display effect, but due to Chinese characters, there may be misalignment. This can be resolved with the unicode-width library.

Planned Features#

Field sorting:

For example, sorting by 'Task Value' from high to low, or sorting by 'Due Date' from nearest to farthest. This feature can be used to learn about sorting and searching algorithms (timsort, driftsort) (Bloom filter).

Completion types:

Classifying tasks as: Daily | Weekly | Monthly | Yearly | X times | Complete by a specified date.

Minimization:

Tasks can be minimized to the system tray.

Additionally, continue to optimize the current output effect, such as adding strikethrough effects for completed and expired tasks, and instead of directly deleting tasks, assign a hidden task status of: Deleted, filtering out this type of task when displaying tasks.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.