Skip to content

ExLeonem/exp-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status

banner

EXP CLI -Track you'r time

A tool to track the time you spend working on a project.

Table of Contents

Installation

There are no existing dependencies to other libraries. However a prequisite for the use is Elixir in version >= 1.8. To Use the CLI you can download the binary or build it locally and afterwards add it to you'r path.

How to build locally?

If you want to use this project as a base for something or just further develop it.

  1. Clone the Repo withgit clone https://github.com/ExLeonem/exp.git
  2. CD into the Repo
  3. Execute mix deps.get && mix escript.buildalternativly you can configure the dev dependencies
  4. Adding the place where the binary is to the Path
  5. And you are ready to go

Note: The directory of the binary needs to be writeable because the CLI will persists the entries into files.

Configuration Parameters

Name writeable? Description
is-recording false Indicates if application currently is recording the time. Switches by calling the stop command.
default-block-length true The block length for the pomodoro timer
default-storage-path true The directory where the entries are written to
output-format true Default output format to use on write command
last-entry false DateTime of last entry written to the entry store

Commands

To start recording a new entry just type:exp start. To stop the recording timer call exp stop -t "Give your record a title" .

General Commands

Name Description Implemented
start Starts recording the time
stop Stops the recording and writes an entry
status Returns the duration since recording
add Writing an entry instantly
show Prints recorded entries.
delete Deletion of entries
get Get information on current configuration
set Setting configuration attributes
-x Export of saved entries into another format in csv or json
-v, --version Prints the current CLI version

Add

Add a complete entry. In essence is equal to recording with start/stop.

If no stop flag is given the end is assumed to be the moment you add the entry. You can use a date on the start and end tags as well to calculate the time usage over multiple days.

Examples:

exp add -s 15:10

exp add -s 12:12 -t "I worked on my project" -g tag1,tag2,tag3

exp add -s "10-10-2019 10:10" -e "11-10-2019 15:00" --title "hello world"

Flag Required? Description
-s, --start true Start of the entry formatted asHH:MM, DD-MM-YYYY HH:MM or DD-MM-YYYY. The missing parts will be filled with the current DateTime
-e, --end false End of the recording. Allowed formats are the same as in --start
-t, --title true Title of the entry
-g, --tag false Add tags to the entry

Show

Passing no flag at all will default to -a, --all

Flag Description
-l, --last Print the last recorded entry.
-a, --all Prints all entries to the terminal.
-f, --filter Filter all entries by given filter and print them to the terminal.

Delete

You can use followin command to the delete an persistet entry.

Examples:

exp delete -l

exp delete --all

Flag Description
-l, --last Delete the last entry
-a, --all Delete all entries
-f, --filter Delete entries by filter term

Get

Request the current set values of configuration parameters. All parameters usable as flags are listed in the configuration parameter list section.

Examples:

exp get --block-length

exp get --block-length --is-recording

Set

Setting default/configuration parameters.

Example: exp set --block-length 1:30 --output-format csv

Flag Type Description
--block-length string Default time for block when using CLI as a pomodoro watch in Format HH:mm

Export

Export the recorded data to a specific Format. The given path must already be existent. Suported output formats are currently csv and json.

Example: exp -x /path/file.csv

Contribution

Contribution is very much appreciated. If you are interested to contribute just write me a Mail. If you have any ideas how to extend this thing. Just open an issue.

About

An elixir based time tracker.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages