Code Monkey home page Code Monkey logo

idid's Introduction

idid

A partially-featured shell script that maintains a log of things that I did.

Usage

1 - Set an environment variable called I_DID_LOG that is set to the location of your log:

For example, in your .zshrc :

export I_DID_LOG=/home/me/path/to/things.i.did.log

2 - Add idid to your path

3 - Add things to the log

$ idid 1 "An example of something that took an hour"

2022-05-19 09:26:42 (Thu) | 1.00 | An example of something that took an hour

The first argument is the amount of time (defaults to hours). To enter time in minutes, add an 'm' to the time:

$ idid 10m "Something quick"

2022-05-19 09:32:22 (Thu) | 0.16 | Something quick

If you omit the time, it will default to 0:

$ idid "This is just a note"

2022-05-19 09:33:56 (Thu) | 0.00 | This is just a note

To see some usage hints, run idid with no arguments

idid
USAGE: idid [time (defaults to hours)][m] [message]
--
EXAMPLE: idid 3 "something that took 3 hours"
EXAMPLE: idid 24m "something that took 24 minutes"
EXAMPLE: idid 1.5h "something that took one and a half hours"
EXAMPLE: idid "something that I didn't track the time of"

Utility Scripts

allidid

The allidid script will display and total the time for entries sent to it. Useful for grepping through the log.

$ cat things.i.did.log | grep "omething" | allidid

  Adding total time from these lines:

  2022-05-19 09:26:42 (Thu) | 1.00 | An example of something that took an hour
  2022-05-19 09:32:22 (Thu) | 0.16 | Something quick

  ------------------
  Total Hours: 1.16

allididtoday

Shows a summary of everything logged today

allididmatch

A shortcut for grepping the log:

$ allididmatch "omething"

  Adding total time from these lines:

  2022-05-19 09:26:42 (Thu) | 1.00 | An example of something that took an hour
  2022-05-19 09:32:22 (Thu) | 0.16 | Something quick

  ------------------
  Total Hours: 1.16

allididon

Prints log lines from a particular date

$ allididon 2022-05-19

Adding total time from these lines:

2022-05-19 09:26:42 (Thu) | 1.00 | An example of something that took an hour
2022-05-19 09:32:22 (Thu) | 0.16 | Something quick
2022-05-19 09:33:56 (Thu) | 0.00 | This is just a note

------------------
Total Hours: 1.16

idid's People

Contributors

jasontypescodes avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.