A lightweight and super fast cli todo program written in rust under 200 sloc

Related tags

Command-line todo
Overview

todo

A lightweight and super fast cli todo program written in rust under 200 sloc

gif

installation

AUR package: todo-bin

use cargo build --release to compile todo and copy target/release/todo to /usr/bin

note

todo is still really early in development so be careful or sth

btw i know that my code is not the best but im still learing

usage

Todo is a super fast and simple tasks organizer written in rust
Example: todo list
Available commands:
    - add [TASK/s]
        adds new task/s
        Example: todo add "buy carrots"
    - list
        lists all tasks
        Example: todo list
    - done [INDEX]
        marks task as done
        Example: todo done 2 3 (marks second and third tasks as completed)
    - rm [INDEX]
        removes a task
        Example: todo rm 4
    - sort
        sorts completed and uncompleted tasks
        Example: todo sort
    - raw [todo/done]
        prints nothing but done/incompleted tasks in plain text, useful for scripting
        Example: todo raw done
Comments
  • Code cleanup

    Code cleanup

    Code cleanup and formatting. For the formatting, I used rustfmt. For the cleanup, I do it by hand. Also, you might wanna check lib.rs line 13. Basically, instead of making the TODO file in the current directory, it creates it in $HOME/TODO

    opened by ezdux 6
  • Wrong Numbering

    Wrong Numbering

    Ok so I'm not sure if this is me just being dumb but the numbering seems to be wrong? I added 3 todos and instead of them being numbered 1 2 3 they were numbered 1 3 5

    opened by eingorz 5
  • MacOS Support

    MacOS Support

    It would be awesome if this could run on macos!

    From what I can tell, the current build panics at line 25 of lib.rs if ran on mac. I tried changing the match statement to include 'macos', but only ran into further errors.

    opened by Smargendorf 4
  • Done feature doesn't work

    Done feature doesn't work

    Hello,

    First, thank you for your work. I found a bug when using done feature.

    ➜ todo list
    1 lol
    2 lil
    
    ➜  todo done 2
    thread 'main' panicked at 'Couldn't open the todofile: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/lib.rs:235:18
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    opened by FBRZGGN 3
  • Feature Request: Allow for variable TODO file paths

    Feature Request: Allow for variable TODO file paths

    Hey there!

    I saw a post on r/linux or r/rust some days ago and have been using it since, thank you so much! With the new mac support PR (I think) the TODO file path has been changed from the current directory to the HOME directory (at least on my pc, which in hindsight after looking at the code was the intended behavior all along).

    Anyhow, I like to have my TODO's split across multiple categories/projects, which was nicely possible with the "local folder TODO file" behavior. Would it be possible to add something like a flag to point to a file to use as TODO file?

    I figured I would open an issue first to talk about the best way to do this (e.g. by a -f flag or having an optional argument before the action that denotes the file).

    opened by tosti007 2
  • [bug] `todo` Couldn't open the todofile

    [bug] `todo` Couldn't open the todofile

    todo version: 2.3.1

    Steps to reproduce:

    while in /home/username/:

    todo add "something"
    cd Documents
    todo done 1
    

    output:

    thread 'main' panicked at 'Couldn't open the todofile: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/lib.rs:226:18
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    

    ~As far as I understand, todo creates a file in my home directory by default and when called from another directory it cannot access it.~ By some weird reason todo list works fine It seems a little bit weird, since I remember seeing TODO files in other directories.

    So, I assume that the creation process is somehow wrong.

    If any extra information / logs needed, then please be kind to provide some instructions on getting them.

    opened by NChechulin 1
  • Updated src/lib.rs

    Updated src/lib.rs

    changed up the name of the list file so it will appear hidden on UNIX systems. Also replaced all mentions of the file name in the code with a constant to make editing the name easier.

    opened by b00l34n 1
  • Added a reset functionality

    Added a reset functionality

    My current workflow is that i create a todo list in the morning and slowly but surely check off the assignments which is done, i don't remove them because i like to see how i'm doing 😅. However because of this i have to go through at the end of the day and delete every entry in the list. Thus i implemented a simple and intuitive reset command which does exacly that.

    opened by nrbjerg 0
  • Use rust directories crate, cleanup code

    Use rust directories crate, cleanup code

    This pull request accidentally became a few features so if you only want a couple of features here let me know and I'll put in a pull request of just those instead. Feedback is of course welcome

    Firstly, this replaces the code that checks for OS with the directories crate which does the same thing but with support for more OS's and includes a function to get the config directory which may be useful later.

    I also replaced the home variable in the Todo struct to be todo_path as a PathBuf. This means you don't have to convert the String to a Path and join TODO on the end. I figure this won't cause any problems because that's the only use of home. This also fixes the issue where running a few functions (such as done) outside the home directory fails

    I also ran rustfmt and fixed a lot of clippy lints. For example .len() < 1 becomes .is_empty() to convey meaning.

    And finally I collapsed all the else blocks that happened after if statements containing process::exit(1) since anything after that can't be reached anyway and it reduces indentation which makes the code a bit easier to follow

    opened by ryancarins 0
  • Support priority indicators

    Support priority indicators

    It would be pretty handy to add priority indicators to the app. For instance, we could divide priorities as:

    1. Low
    2. Normal
    3. Urgent

    and the color code them so that when list() is called, there's a clear visual distinction between them. A basic idea would be create an enum for the types.

    I might do a pull request soon :)

    opened by Crystalsage 0
  • [Feature request] Open todo in current folder by default

    [Feature request] Open todo in current folder by default

    I think it would be cool if, when launching the Todo command, it would look for a todo list inside the current folder, without the hustle of having to specify the 'TODO_PATH=' every time. Then, if the current folder does not have a list in itself, go and search for the home path one. Another thing would be to add an option (like "home") to skip the lookup of the current folder.

    opened by engibengi 0
  • [Feature request] Allow a method for organizing todos into different boards or labels.

    [Feature request] Allow a method for organizing todos into different boards or labels.

    Allow a method for organizing todos via f.x. boards similar to Taskbook. This would use @labels to create so called boards which can then be queried with todo list @boardname to only show tasks belonging to the queried board. Calling todo list on its own would list all boards e.g.

    @work
    - task A
    - task B
    
    @personal
    - task C
    - task D
    
    @projectname
    - task E
    - task F
    
    opened by voidscuttle 0
  • support markdown

    support markdown

    User can opt into saving their todo in the form of markdown.

    Currently

    todo saves todos in a TODO file.

    Request

    Save todo in an opt in markdown file.

    Eg.

    # TODO
    
    1. Foo
    2. Bar
    

    This allows cross device sync, eg with nextcloud. Ease of bulk editing using text editors. This can benifit users already using markdown for mangaing their todo.

    A config file can be saved at $HOME with destination file/folder preferences.

    opened by aniketfuryrocks 0
  • stdin [FEATURE]

    stdin [FEATURE]

    It would be nice if todo can take tasks from stdin.

    Usage Add tasks echo banana orange | todo add or cat my_issues.txt | todo add

    Mark done tasks start with 'today': todo raw todo | grep '^today' | todo done

    Possibilities would be endless.

    Nice tool, btw!

    opened by GenesisTMS 2
Releases(2.5)
Owner
sioodmy
sioodmy
A todo list app that indexes your app to find TODO:'s

forgot A todo list app that indexes your app to find TODO:'s Usage to list all your todos forgot list list all your todos ignoring search in ./target,

null 2 Oct 6, 2022
A simple program that provides DBus interface to control display temperature and brightness under wayland without flickering

wl-gammarelay-rs Like wl-gammarelay, but written in rust, runs on a single thread, has three times less SLOC and uses DBus (for simplicity). Dbus inte

Max Verevkin 33 Nov 23, 2022
Super-lightweight Immediate-mode Embedded GUI framework, based on the awesome embedded-graphics library. Written in Rust.

Kolibri - A GUI framework made to be as lightweight as its namesake What is Kolibri? Kolibri is an embedded Immediate Mode GUI mini-framework very str

null 6 Jun 24, 2023
Cross-platform CLI Rimworld Mod manager. Still under development

rwm Inspired by Spoons rmm. This is a cross-platform Mod Manager for RimWorld intended to work with macOS, linux and Windows Up to now, you must have

Alejandro O 7 Sep 5, 2022
A super simple /sbin/init for Linux which allows running one and only one program

Summary High-performance /sbin/init program for Linux This is designed to do literally nothing but accept binaries over the network and run them as a

null 19 Dec 4, 2023
Open source email client written in Rust and Dioxus. Under 🏗️

Blazemail A full-featued, beautiful, mail client that doesn't suck. Works on mac, windows, linux, mobile, web, etc. Features, status Blazemail is curr

Jon Kelley 13 Dec 19, 2022
Super-lightweight git manager

gmg - Super-lightweight git manager The idea The idea is simple: no extra server layer, no extra proxies. Just a pure git and ssh. Setup The setup scr

Altertech 8 Mar 19, 2023
A super simple but lightweight logging library that tries to capture the most important (status) information.

Hackerlog A super simple but lightweight logging library that tries to capture the most important (status) information. The following is supported: Lo

434b 3 Aug 22, 2023
Just a simple object renderer, written in under 500 lines using Rust.

All cargoes that the project runs are: bitflags: a crate for defining bitflag types cfg-if: a small macro crate for defining cfg-based - conditional c

null 3 May 4, 2023
Todo REST API with Rust,Axum, and Diesel

Building a Todo API with Rust - A Step-by-Step Guide Using Axum and Diesel This is the project demonstrating how to build a Todo REST API by using Rus

Rapidapp 3 Aug 11, 2024
A todo list from terminal. Compatible with Linux and Windows, not tested on macOS

todocli A todo list from terminal. Compatible with Linux and Windows, not tested on macOS (not planing on support tho). Note: Currently being rewritte

Patommmmm 3 Dec 12, 2022
global state management for dioxus built on the concept of atoms. currently under 🏗

Fermi: A global state management solution for Dioxus, inspired by Recoil.Js Fermi provides primitives for managing global state in Dioxus applications

Dioxus 15 Feb 12, 2022
A simple program for C program IO testing. Written in Rust

A simple program for C program IO testing. Written in Rust, using concurrency to speed up valgrind testing. Make sure to update settings at your first run of the program!

null 1 Feb 22, 2022
Simple Interactive Terminal Todo App in Rust

todo-rs Simple Interactive Terminal Todo App in Rust Quick Start $ cargo run TODO Controls Keys Description k, j Move cursor up and down Shift+K, Shif

Tsoding 56 Dec 8, 2022
A blazingly fast & lightweight Obsidian CLI ⚡️

obs - the Obsidian CLI ⚡️ Connecting your second brain to the termainl - blazing fast ⚡️ Note ?? obs is under active development and currently only su

null 5 Mar 4, 2023
That program use on platform windows. And if you write any text on uncorrect keyboard layout, that program for that.

?? This program is designed to translate text into the correct layout when typing is incorrect. ?? Example ghbdtn -> привет Just (by default) pressing

Gest Se 5 Jan 26, 2023
A safe, fast, lightweight embeddable scripting language written in Rust.

Bud (budlang) A safe, fast, lightweight embeddable scripting language written in Rust. WARNING: This crate is not anywhere near being ready to publish

Khonsu Labs 13 Dec 27, 2022
A minimal browser with a super simple rendering engine for HTML and CSS, using Rust.

minimal-browser A minimal browser with a super simple rendering engine for HTML and CSS, using Rust. Credit: https://github.com/mbrubeck and https://l

Federico Baldini 3 Jan 15, 2023
A super simple prompt for Fish shell, just shows git info and Vi mode.

vifi is a portmandeau of 'Vi' and 'Fish', because it's a prompt for Fish shell, primarily focused around showing proper indicators when using Vi key bindings.

Mat Jones 1 Sep 15, 2022