-
Notifications
You must be signed in to change notification settings - Fork 18
/
README.Rmd
118 lines (77 loc) · 2.24 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%",
eval = FALSE
)
```
<!-- badges: start -->
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/togglr)](https://cran.r-project.org/package=togglr)
[![](http://cranlogs.r-pkg.org/badges/togglr)](https://cran.r-project.org/package=togglr)
[![R-CMD-check](https://github.com/ThinkR-open/togglr/workflows/R-CMD-check/badge.svg)](https://github.com/ThinkR-open/togglr/actions)
<!-- badges: end -->
# togglr
An R and Rstudio wrapper for toggl Api.
<https://www.toggl.com/>
Documentation site: https://thinkr-open.github.io/togglr/
## Installation of `togglr`
### From CRAN
```{r}
install.packages("togglr")
```
### From Github
```R
if (!requireNamespace("remotes")){install.packages("remotes")}
remotes::install_github("ThinkR-open/togglr")
```
## Set toggl Api token
Go on toogl.com website : `https://track.toggl.com/profile`
```{r}
togglr::open_toggl_website_profile()
```
then select and copy your token api at the bottom of the page.
```{r}
library(togglr)
set_toggl_api_token("your_token_api")
```
You just need to do this once.
## Start the tracking system
Without any parameters it will create a new project using your Rstudio project name.
```{r}
toggl_start()
```
By default the client name is "without client" you can choose (and eventualy create a client) by using :
```{r}
toggl_start(client = "my client")
```
But you can also choose the task and the project
```{r}
toggl_start(client = "my client",
description = "what I'm doing",
project_name = "my project")
```
## Stop the tracking system
```{r}
toggl_stop()
```
## Get total time passed on the current project
```{r}
get_current_duration()# the current track
get_current_project_task_detail()# (including the current track)
```
## Get all your dashboard
```{r}
get_dashboard()
```
## Use Rstudio Addins
This package comes with 2 Rstudio addins 'start toggl' and 'stop toggl', feel free to use keybindings for convenience.
## Some other uselfull functions are in this package
```{r}
ls(package:togglr)
```