From 19ba789127cd7b6a2950a81bec377d903195bf41 Mon Sep 17 00:00:00 2001 From: Jimmy Fagerholm Date: Wed, 12 Jan 2022 09:05:45 +0200 Subject: [PATCH] Patch install and README --- README.md | 60 ++++++++++++++---------------------------------------- install.sh | 9 ++++---- 2 files changed, 19 insertions(+), 50 deletions(-) diff --git a/README.md b/README.md index 1d5a443..59a2712 100644 --- a/README.md +++ b/README.md @@ -1,57 +1,27 @@ -![.github/workflows/release.yaml](https://github.com/Faagerholm/clockify-cli/workflows/.github/workflows/release.yaml/badge.svg?branch=v1.1&event=release) -[![CLI Best Practices](https://bestpractices.coreinfrastructure.org/projects/4331/badge)](https://bestpractices.coreinfrastructure.org/projects/4331) - -Buy Me A Coffee - # clockify-cli -**Version 2.0 is out!** - -Now with to new UI for a better experiance Integrate your clocking with your favorite CLI. -*Please note: This tool does not take any responsibilities of spam on behalf of the user against the clockify API.* - -## Install: - -```bash -wget https://raw.githubusercontent.com/Faagerholm/clockify-cli/master/install.sh && ./install.sh -``` - -## Usage: +### Usage: ``` clockify-cli [flags] clockify-cli [command] - clockift-cli // Start menu ``` -## Available commands: +### Available commands: ``` -Available Commands: - add-key Add users API-KEY, this will store it in a yaml file. - add-part-time Add part-time work to your account - check-balance Check balance - current-user get current user - default-project Select default workspace project - help Help about any command - list-projects List all projects - menu Select action to perform - reset Resets viper values - setup Setup - start-timer Select a project and start a timer - stop-timer Stop timer + add-key Add users API-KEY + balance Display if you're above or below zero balance. + help Help about any command + off-projects Select which projects should be omitted from reports + projects Select default workspace project + reset Resets viper values + start start timer for project. Use 'default' flag to use default project id. + stop Stops an active timer. + user get current user + version Print the version number of Clockify-cli + workspace Get workspaces Flags: - --config string config file (default is $HOME/.clockify-cli/config.yaml) + --config string config file (default is $HOME/.clockify-cli/config.yaml) (default "./config.yaml") -h, --help help for clockify-cli --viper use Viper for configuration (default true) - -Use "clockify-cli [command] --help" for more information about a command. -``` - -## Contributing: - -Please open an issue if there is something that is not working or you would like to be added to this project. - -## External API: - -Clockify has an API that this project heavily depends on. The API can be accessed by any user that has generated an API key from their user settings page. -More information about the API can be found here: https://clockify.me/developers-api +``` \ No newline at end of file diff --git a/install.sh b/install.sh index 16a160e..80037d0 100755 --- a/install.sh +++ b/install.sh @@ -21,12 +21,12 @@ fi echo "Creating alias for clockify" if [ -f "$HOME/.zshrc" ]; then echo "Adding it to your zshrc file." - alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >> $HOME/.zshrc + alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >>$HOME/.zshrc elif [ -f "$HOME/.bash_profile" ]; then echo "Adding it to your bash_profile file." alias clockify >/dev/null 2>&1 && echo "clockify is set as an alias, skipping update of source file." || echo "alias clockify='$PROJECT_HOME/clockify-cli'" >>$HOME/.bash_profile -else - echo "Could not fine a terminal profile, please manually add 'alias clockify='$PROJECT_HOME/clockify-cli' to your profile."; +else + echo "Could not fine a terminal profile, please manually add 'alias clockify='$PROJECT_HOME/clockify-cli' to your profile." fi processor="$(uname -m)" @@ -164,7 +164,7 @@ fi echo 'Done!' echo '-------------------' -mv clockify-cli $PROJECT_HOME/clockify-cli +mv clockify-cli $PROJECT_HOME echo 'To get started you will need a API-key. The key can be genereted on your profile page.' $PROJECT_HOME/clockify-cli init @@ -173,4 +173,3 @@ $PROJECT_HOME/clockify-cli user echo "Initialization completed, please run 'clockify help' to get started." echo "You will have to restart any active terminal instance to access you newly created command." echo "You can also read the source file with e.g. 'source ~/.zshrc'". -