From 161d11abfad116a219b490ad83e0a30461bcd455 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 00:51:03 +0200 Subject: README: Rewrite the opening description Remove references to the project being abandoned. Briefly describe it. --- README.md | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1b7f244..5c4cd42 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,13 @@ Timetasker CLI ============== -## [ABANDONED] -This project has been abandoned. What I wanted was a nice command line interface -to be able to submit time sheets using [Time Task](https://timetask.com), but -the result wasn't really what I had hoped for. Ultimately I didn't see this tool -saving me much more time (if any) compared with using the website. +Provides a nice command line interface to submit time sheets using [Time +Task](https://timetask.com). This command will submit a single time entry. -My idea was to have the executable generate a weekly time sheet as YAML with -prepopulated defaults. This file could then be modified by the user if necessary -and submitted to the website via the CLI tool. - -The project is succeeded by a [Chrome +The project improves upon a [Chrome extension](https://github.com/teddywing/chrome-timetasker) that auto-fills the time sheet form on the website. -Posting this code in the event that it becomes useful to anyone. - ## License Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included -- cgit v1.2.3 From d0bb458eb592c76d1b1fed7b9ab692f9cb5b4838 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 00:57:22 +0200 Subject: README: Add Usage section Show some examples of how to use the program. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 5c4cd42..1d0b99e 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,21 @@ extension](https://github.com/teddywing/chrome-timetasker) that auto-fills the time sheet form on the website. +## Usage +This will submit a time entry for the "example" project on the current day with +a duration of 7 hours and an empty description: + + $ timetasker --project example + +Here we set a custom time of 4.5 hours: + + $ timetasker --project example --time 4.5 + +Now we specify a date and add a description: + + $ timetasker --project example --date 2017-05-31 --description "Worked on Timetasker" + + ## License Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included COPYING file). -- cgit v1.2.3 From f01841d43182709ba64cd46a5a4d02b11728e826 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:15:28 +0200 Subject: README: Add Configuration section Explain the program's configuration and how to configure it using data from TimeTask. --- README.md | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/README.md b/README.md index 1d0b99e..6c1416c 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,78 @@ Now we specify a date and add a description: $ timetasker --project example --date 2017-05-31 --description "Worked on Timetasker" +## Configuration +Timetasker relies on a configuration file in order to work properly. + +If this is your first time running Timetasker, use this command to generate a +skeleton config: + + $ timetasker --write-config + +This will generate a `$HOME/.config/timetasker/config.toml` file that looks like +this: + + [auth] + username = "" + password_cmd = "" + + + [profile] + person_id = # ADD PERSON ID + + + [projects.example] + client = # ADD CLIENT ID + project = # ADD PROJECT ID + module = # ADD MODULE ID + task = 0 + work_type = # ADD WORK TYPE ID + billable = true + +Fill in the `username` with your TimeTask username. The `password_cmd` should be +a shell command that will output your TimeTask password to STDOUT. + +Notice the `[projects.example]` line? That's a project alias. If we, for +instance, changed it to `[projects.my-cool-project]`, we could post a time entry +to that project like this: + + $ timetasker --project my-cool-project + +You say you have more than one project? No problem, just copy-paste the entire +`[projects.example]` section and give it a new name. + +To fill in the other configuration options, we're going to have to take a trip +to the TimeTask website (relax, we won't be using it much after this). + +1. Visit `https://*.timetask.com/time/add/` +2. Fill in a single entry, but don't submit it yet +3. Open the Network console in your browser's developer tools +4. Submit your time entry +5. Open the POST request to `https://*.timetask.com/index.php` +6. Take a look at the form data of the request + +You should see something like this: + + module:time + action:submitmultipletime + f_entryIndexes:0 + f_personID0:111111 + f_clientID0:22222 + f_projectID0:333333 + f_moduleID0:444444 + f_taskID0:0 + f_worktypeID0:555555 + f_date0:04/06/17 + f_time0:7 + f_billable0:t + f_description0: + +Copy the numbers into their corresponding fields in your `config.toml` file. + +Once you have a complete config file, you should be all set to start posting +time entries! + + ## License Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included COPYING file). -- cgit v1.2.3 From 79b5deb4a3f7530efe83c9d90ab45d52b97ccf79 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:23:32 +0200 Subject: README: Add Install section Installation instructions. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 6c1416c..d47d1e9 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,18 @@ Once you have a complete config file, you should be all set to start posting time entries! +## Install +Visit the [releases][3] page, download the version corresponding to your +platform, and put the resulting `timetasker` binary on your PATH. + +To install from source, use: + + $ go install github.com/teddywing/timetasker + + ## License Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included COPYING file). + + +[3]: https://github.com/teddywing/timetasker/releases -- cgit v1.2.3 From b7f6ee30221f208a3505b03390d6e9f0431c448e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:24:57 +0200 Subject: README: Move URLs to bottom of file Makes it a bit easier to read as text. --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d47d1e9..f137a08 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,10 @@ Timetasker CLI ============== Provides a nice command line interface to submit time sheets using [Time -Task](https://timetask.com). This command will submit a single time entry. +Task][1]. This command will submit a single time entry. -The project improves upon a [Chrome -extension](https://github.com/teddywing/chrome-timetasker) that auto-fills the -time sheet form on the website. +The project improves upon a [Chrome extension][2] that auto-fills the time sheet +form on the website. ## Usage @@ -110,4 +109,6 @@ Copyright © 2017 Teddy Wing. Licensed under the GNU GPLv3+ (see the included COPYING file). +[1]: https://timetask.com +[2]: https://github.com/teddywing/chrome-timetasker [3]: https://github.com/teddywing/timetasker/releases -- cgit v1.2.3 From bd8fff1d37a48e8fba4559f7fd34f6c2af507806 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:55:00 +0200 Subject: README: Add an additional Usage example I thought it would be cool if we showed off an example connecting `timetasker` with another shell command. --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index f137a08..a981d56 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,15 @@ Now we specify a date and add a description: $ timetasker --project example --date 2017-05-31 --description "Worked on Timetasker" +And because it's a shell command, we can combine it with other commands. Let's +create a week's worth of time entries starting on Monday May 29th, 2017: + + $ for d in $(ruby -e "require 'date' + > d = Date.new(2017, 5, 29) + > (0..4).each { |i| puts (d + i).strftime('%Y-%m-%d') }"); + > do timetasker --project example --date $d; + > done + ## Configuration Timetasker relies on a configuration file in order to work properly. -- cgit v1.2.3 From 48c53b17b4d77ef2a094eb3fc3bf163e0ca75b29 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:55:58 +0200 Subject: README: Improve readability of command line example Split the example code onto multiple lines to improve readability. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a981d56..9e105c8 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,9 @@ Here we set a custom time of 4.5 hours: Now we specify a date and add a description: - $ timetasker --project example --date 2017-05-31 --description "Worked on Timetasker" + $ timetasker --project example \ + > --date 2017-05-31 \ + > --description "Worked on Timetasker" And because it's a shell command, we can combine it with other commands. Let's create a week's worth of time entries starting on Monday May 29th, 2017: -- cgit v1.2.3 From d575e2535b4ce53e875a6ef6ac21cbbb6e51fca2 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:56:55 +0200 Subject: README: Change description wording I personally think this tool "vastly improves" upon the Chrome extension. After all, it's much more flexible, and it lives in the console, both of which are immense pluses. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e105c8..9d89ce2 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Timetasker CLI Provides a nice command line interface to submit time sheets using [Time Task][1]. This command will submit a single time entry. -The project improves upon a [Chrome extension][2] that auto-fills the time sheet -form on the website. +The project vastly improves upon a [Chrome extension][2] that auto-fills the +time sheet form on the website. ## Usage -- cgit v1.2.3 From c715a7219c65293112f377bc16a4bcf9f9f27de5 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 01:58:24 +0200 Subject: README: Improve wording of multiple project configuration paragraph The wording seemed a bit confusing before. Change it to make it clear that you're supposed to add a new "projects" block to the config. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9d89ce2..2c9845a 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ to that project like this: $ timetasker --project my-cool-project -You say you have more than one project? No problem, just copy-paste the entire -`[projects.example]` section and give it a new name. +You say you have more than one project? No problem, just copy-paste an +additional `[projects.example]` section and give it a new name. To fill in the other configuration options, we're going to have to take a trip to the TimeTask website (relax, we won't be using it much after this). -- cgit v1.2.3 From 10cfa06cb6b6da7ea437f32414af84e62d31ed44 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 4 Jun 2017 02:00:09 +0200 Subject: README: Improve wording of Configuration step "Open" sounded a bit ambiguous to me. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c9845a..4c34af7 100644 --- a/README.md +++ b/README.md @@ -81,7 +81,7 @@ to the TimeTask website (relax, we won't be using it much after this). 2. Fill in a single entry, but don't submit it yet 3. Open the Network console in your browser's developer tools 4. Submit your time entry -5. Open the POST request to `https://*.timetask.com/index.php` +5. View the POST request to `https://*.timetask.com/index.php` 6. Take a look at the form data of the request You should see something like this: -- cgit v1.2.3