DamirsCorner.ClockifyExport 1.0.0

dotnet tool install --global DamirsCorner.ClockifyExport --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local DamirsCorner.ClockifyExport --version 1.0.0                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=DamirsCorner.ClockifyExport&version=1.0.0                
nuke :add-package DamirsCorner.ClockifyExport --version 1.0.0                

ClockifyExport

The tool exports data from a Clockify shared report, groups the entries for the same day, and saves it as JSON or CSV with the following fields:

  • Date: Date of the grouped time entry. Non-parsed string as it appears in the Clockify shared report CSV.
  • Group: Project or task of the grouped time entry.
  • Hours: Sum of time for the grouped time entry, expressed as total hours (with decimal part).
  • Description: All descriptions for the grouped time entry, each in its own line.

You need the following information from Clockify to invoke the tool:

Installation

You can install the latest version as a global .NET tool from the NuGet Gallery with the following command:

dotnet tool install -g DamirsCorner.ClockifyExport

Alternatively, you can download the NuGet package from the GitHub Releases page and install that package with the following command:

dotnet tool install -g DamirsCorner.ClockifyExport --add-source "."

The command assumes the downloaded package is located in the current directory. If not, change the --add-source value to point at the directory containing the package.

Usage

Usage: clockifyexport [options]

Options:
  -a|--api-key <API_KEY>              Clockify API key.
  -i|--report-id <REPORT_ID>          Clockify shared report ID.
  -s|--start-date <START_DATE>        Report start date (inclusive).
  -e|--end-date <END_DATE>            Report end date (inclusive).
  -g|--grouping <GROUPING>            Column to group by time entries within a day.
                                      Allowed values are: ByTask, ByProject.
  -r|--round-up-to <ROUND_UP_TO>      Number of minutes to round duration up to after grouping.
  -t|--task-id-regex <TASK_ID_REGEX>  Regex to use for task id parsing.
  -f|--format <FORMAT>                Export format.
                                      Allowed values are: Csv, Json.
  -o|--output <OUTPUT>                Output file.
  -b|--base-url <BASE_URL>            Base URL of the Clockify Reports API.
                                      Default value is: https://reports.api.clockify.me/.
  -?|-h|--help                        Show help information.

Sample call:

clockifyexport --api-key YourApiKey --report-id YourReportId --start-date 2024-01-01 --end-date 2024-01-31 --grouping ByTask --round-up-to 15 --format Csv --output out.csv --task-id-regex [A-Z\\d]+\\-\\d+

Troubleshooting

In the project repository (in the .bruno folder), you can find a Bruno collection with a few API calls. Use them to test the API key and report ID values you are providing to the tool.

  • Get user: Returns your user data. Use it to confirm that your API key (apiKey secret in Bruno environment) is working.
  • Get workspaces: Returns a list of your workspaces.
  • Get shared reports: Returns a list of shared reports in a workspace (workspaceId secret in Bruno environment: set its value to id from the Get workspaces call).
  • Generate shared report: Returns a generated shared report in CSV file (reportId secret in Bruno environment: set its value to id from the Get shared reports call). Set the date range to your liking. The same call is used by the tool.
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.0.0 117 9/15/2024