Giter Club home page Giter Club logo

todo's Introduction

todo

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

gif

installation

AUR package: todo-bin

Nix Flake

Add todo.url = "github:sioodmy/todo"; to your inputs. And inputs.todo.packages."x86_64-linux".todo to home.packages

other distros

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
    - reset
        deletes all tasks
    - restore
        restore recent backup after reset
    - 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

todo's People

Contributors

crystalsage avatar ezdux avatar htanmo avatar nrbjerg avatar robert5800 avatar ryancarins avatar sioodmy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo's Issues

Unable to run the project

I cloned the project in VS code but when i am trying to run it in visual studio code terminal like "todo orange banana" it says todo command not found. so help me out how to run it.

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).

to_string and io::stdout().lock

At line 56 in [fn new] lib.rs, variable contents, whose type is a String, call to_string on itself. Why to_string is needed here. (I remove it, the code still work well).
At line 69 in [fn list] lib.rs, stdout is locked. I assume lock is needed when you have multiple thread, the lock let one thread finish all its print things then let another thread print. Here is only one thread, Is lock necessary? (I also remove it and find the code still work well).

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 :)

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.

[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.

[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.

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!

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.

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.