Add installation instructions to README

This commit is contained in:
Marko Korhonen 2023-11-14 19:15:33 +02:00
parent 1eb65c28a0
commit 5064cf92f9
Signed by: FunctionalHacker
GPG key ID: A7F78BCB859CD890

View file

@ -1,14 +1,40 @@
== Work time calculator = Work time calculator
An interactive CLI tool to calculate work time. An interactive CLI tool to calculate work time.
== Install
You can run this in your terminal
[,shell]
----
npm i -g work-time-calculator
----
If you get a permission denied error, you can run the previous command
with sudo (**not recommended**), or you can set a local prefix to npm.
Feel free to create the prefix wherever you like, this is just a
location I decided to use. The only requirement is that the location
needs to be readable and writable by your user.
[,shell]
----
npm config set prefix '~/.local/share/npm'
----
After that you can run the installation again. Running the program
requires that you have your npm prefix in your `$PATH`. You can find
an example of this in my https://git.korhonen.cc/FunctionalHacker/dotfiles/src/commit/4442252c659179d860d71982a6b705dcecc54ea6/home/.config/zsh/02-env.zsh#L31-L32[dotfiles]. This configuration file is for ZSH but should also work for bash.
== Rationale
This is a highly opinionated CLI tool I built for my specific needs. This is a highly opinionated CLI tool I built for my specific needs.
In time, I will probable make it more generic and configurable. In time, I will probable make it more generic and configurable.
For now, the following assumptions are made. For now, the following assumptions are made.
* You have an unpaid 30 minute lunch break * You have an unpaid 30 minute lunch break
=== TODO == TODO
* [ ] Configuration file for default settings and altering behaviour in interactive mode * [ ] Configuration file for default settings and altering behaviour in interactive mode
* [ ] Non-interactive mode with CLI arguments parsing * [ ] Non-interactive mode with CLI arguments parsing