You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-2Lines changed: 17 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,22 @@ This will show you a table with the time entries in both systems and if there is
70
70
2. If some data is in OpenProject but not in tmetric, delete or edit it in OpenProject. To do so use the [cost-report feature](https://www.openproject.org/docs/user-guide/time-and-costs/reporting/).
71
71
3. If you want to sync data again from tmetric to OpenProject, remove the `transferred-to-openproject` tag from the time entries in tmetric. **This will create new entries in OpenProject and by that might lead to duplication.**
72
72
73
-
#### work for a specific time period
73
+
#### export data
74
+
Data can be exported using the [Go template system](https://pkg.go.dev/text/template). This is useful e.g. to generate an invoice.
75
+
First create a template file and then run:
76
+
77
+
```bash
78
+
go run main.go export --template template.tmpl
79
+
```
74
80
75
-
By default, the script will work with the current calendar month, but the start and end date can be configured with the `--start` and `--end` flags. The date format is `YYYY-MM-DD`.
81
+
-**DetailedReport** with parameters: `clientName string, tagName string, groupName string`. Gets a detailed report from t-metric and returns a `tmetric.Report` object.
82
+
-**AllWorkTypes**. Gets all possible work types from t-metric and returns an array of `tmetric.Tag`
83
+
-**AllTeams**. Gets all teams from t-metric and returns an array of `tmetric.Team`
84
+
-**ServiceDate**. Returns the month of the `--start` date for the export in the format `01/2006`
85
+
-**AllTimeEntriesFromOpenProject** with parameter `user string`. Gets all time entries for that user from OpenProject and returns an array of `openproject.TimeEntry`
86
+
-**ArbitraryString** with parameter `i int`. Gets the data of the `arbitraryString` command line flag. Useful e.g. to add an invoice number.
87
+
-**formatFloat** with parameters `f float64, decimalSeparator string (optional)`. Formats the float value to `%.2f` with that given separator.
88
+
- all functions from [spring](https://masterminds.github.io/sprig/)
76
89
90
+
#### work for a specific time period
91
+
By default, the script will work with the current calendar month, but the start and end date can be configured with the `--start` and `--end` flags. The date format is `YYYY-MM-DD`.
0 commit comments