Learn Rust by 500 lines code

crate<em>version crate</em>downloads license

English | 中文

rtd<em>list</em>all

Table of contents


What can you learn from RTD?

Assuming you know nothing about Rust, through the Learn Rust by 500 lines code tutorial, step by step to build the project from scratch, you will learn:

Architecture

rtd_arch

Storage

Use a local file $HOME/.rtd.csv store all data

data<em>storage rtd</em>list_all

After completing this tutorial or installing RTD directly, you will get:


Interesting fact: I use RTD to complete the RTD tutorial :)

If you like my tutorial, don't forget to give me a star~


Prepare

Install

Via crate.io :

bash cargo install rtd-tutorial

Or via git repo :

bash git clone https://github.com/cuppar/rtd.git cargo install --path rtd

Usage

View help document

bash rtd -h rtd --help

rtd<em>help</em>summary rtd_help

Add a todo

bash rtd -a <item-name> rtd --add <item-name>

rtd_add

List all uncompleted todos

bash rtd rtd -l rtd -l uncompleted rtd --list rtd --list uncompleted

rtd<em>list</em>uncompleted

Complete a todo

bash rtd -c <item-id> rtd --complete <item-id>

rtd<em>complete</em>item

List all completed todos

bash rtd -l completed rtd --list completed

rtd<em>list</em>completed

Uncomplete a todo

bash rtd -u <item-id> rtd --uncomplete <item-id>

rtd<em>uncomplete</em>item

Throw a todo into the recycle bin

bash rtd -d <item-id> rtd --delete <item-id>

rtd<em>delete</em>item

List all recycle bin todos

bash rtd -l deleted rtd --list deleted

rtd<em>list</em>deleted

Restore a todo from the recycle bin

bash rtd -r <item-id> rtd --restore <item-id>

rtd<em>restore</em>item

Physically destroy a todo

bash rtd --destroy <item-id>

rtd<em>destroy</em>item

Empty recycle bin

bash rtd --destroy-deleted

rtd<em>destroy</em>deleted

List all todos

bash rtd -l all rtd --list all

rtd<em>list</em>all

Clear all todos

bash rtd --clear

rtd_clear

About author

Cuppar He(He Zhiying), software development engineer, likes programming, technical writing, learning new things, especially computer science, worked for SAP(World Top 100) and Alibaba Group(World Top 100 & Chinese internet giant). I am currently in Gap Year, if you are looking for a software development engineer and can provide a high-quality offer(Both remote and on-site), please contact me cuppar.hzy@gmail.com.