Giter Site home page Giter Site logo

opus-cli's Introduction

opusCli

simple to-do manager for power users

Installation

Binary

opus can be installed via the provided binary files in the release section, here.

Select the latest release, add the opus executable to a directory which is registered in the path variable and you're good to go.

From source

Make sure cargo and rustup are installed

git clone https://github.com/xnacly/opusCli
cargo build --release
./target/release/opus

Cargo will now build opus for the target you're currently using as a operating system. The resulting executable can be found in the target directory: target/release/opus

Usage

Add a task

  • title is the only required value
  • opus replaces @tomorrow and @today with the corresponding dates in YYYY-mm-DD notation
# add a new task with the following properties:
# title: review and merge pr 5
# due: @tomorrow
# tag: #github
# priority: 3
opus add "review and merge pr 5 @tomorrow #github .3"
# add a new task with the given title
opus a "review and merge pr 5"

List tasks

  • this command hides finished tasks from the opus ls command
# list all tasks
opus list
# list all task + finished tasks
opus list --finished
# list all task with the tag #work
opus list "#work"
# list all tasks with the priority 3
opus list .3
# list the task with the id 1
opus list 1
opus ls 1
opus l 1
# sort list output by task property
opus list --sort-by=id
opus list --sort-by=due
opus list --sort-by=finished
opus list --sort-by=title
opus list --sort-by=priority
opus list --sort-by=tag
# sort desc and asc (default sort is asc)
opus list --sort-by=id --sort-order=desc
# [2]: 'read c how to' (2022-10-17)
# [1]: 'notion aufsetzen' (2022-10-18) #uni .1
# --
# 2 tasks found matching query: 'list'

Mark a task as finished

  • opus hides finished tasks from the opus ls command
  • contrary to opus ls, opus fin does only accept a tasks id as the argument
# mark the task with id=1 as finished
opus finish 1
opus fin 1
opus f 1

Remove all tasks

# this clears the whole database
opus clear

Export Tasks

  • opus exports all tasks to a specified file
# exports all tasks in the data.json file
opus export --format="json" --output="data.json"
# export all tasks in the data.csv file
opus export --format="csv" --output="data.csv"
# export all tasks in the data.tsv file
opus export --format="tsv" --output="data.csv"

Delete a task

  • just like opus finish, opus delete only accepts a tasks id as the argument
# delete the task with id=1
opus delete 1
opus del 1
opus d 1

Configuration

The OPUS_PATH env variable

By default opus decides where to store its database based on your operating system. Currently opus supports automatically figuring out where to store the database on windows, linux and macos.

  • Linux and Macos: $HOME/opus/opus.db or $XDG_CONFIG_HOME/opus/opus.db
  • Windows: %LOCALAPPDATA%/opus/opus.db

For use cases which force the use of a different location, opus honors the OPUS_PATH environment variable. Set this variable and override the above paths.:

  • Linux: add to .bashrc (or your shells config file)
set OPUS_PATH=~/.config # opus will create and use ~/.config/opus/opus.db
  • Windows: Add to your system environment variables guide.

Opus will create the opus/opus.db file and directory in the directory specified in the OPUS_PATH variable

opus-cli's People

Contributors

antoniosbarotsis avatar hlxid avatar xnacly avatar

Stargazers

 avatar  avatar

Watchers

 avatar

opus-cli's Issues

Add possibility in `opus list` to sort tasks

Currently, tasks are output in the order that they are inside the SQLite database.
It would be pretty handy to be able to sort the displayed tasks by priority, due date or id.
This could be done with a command line flag, e.g. --sort priority (maybe with short forms like --sort prio).

Display finished tasks

add a command similar to opus ls but to query all tasks not only finished ones.

Alternatively add a --finished flag to opus ls (this would however require a rewrite of the command parsing logic)

Migrate to clap

  • migrating to clap could simplify args parsing and displaying help
  • migrate args parsing and internal argument matching to clap
  • reimplement commands
    • list
    • add
    • delete
    • finish
    • clear
    • export
  • document usage changes

Usage

  • simplified usage overview in Readme
  • in depth usage documentation

Installation

  • package
    • aur
    • .deb
  • binary (install script for binaries)
  • cargo install

Fancy format for viewing tasks

C:\programming\opusCli>cargo run -- ls 1
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running `target\debug\opus_cli.exe ls 1`
[
    Task {
        id: Some(
            1,
        ),
        title: "update excel sheet",
        tag: "#work",
        priority: 3,
        due: "2022-10-05",
        finished: false,
    },
]
--
TODO: 1 tasks found matching query: '1'

The current display after running ls is just a pretty formatted data structure dump, this should change. Maybe:

  • table or box view (e.g. like sqlite .mode)
  • text separated by spaces

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.