Wakatime
Onofficiรซle Beta-vertaling
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ
Watโ
Toont de bijgehouden tijd op wakatime voor de huidige dag
let op
Je moet een API-sleutel aanvragen op de wakatime website. Het gratis abonnement is voldoende. Je vindt de API-sleutel op de pagina met je profielinstellingen.
Voorbeeldconfiguratieโ
- json
- yaml
- toml
{
"type": "wakatime",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#ffffff",
"background": "#007acc",
"options": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY",
"http_timeout": 500
}
}
type: wakatime
style: powerline
powerline_symbol: ๎ฐ
foreground: "#ffffff"
background: "#007acc"
options:
url: https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY
http_timeout: 500
type = "wakatime"
style = "powerline"
powerline_symbol = "๎ฐ"
foreground = "#ffffff"
background = "#007acc"
[options]
url = "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key=API_KEY"
http_timeout = 500
Optiesโ
| Name | Type | Default | Description |
|---|---|---|---|
url | string | The Wakatime summaries URL, including the API key. Example above. | |
http_timeout | int | 20 | The time (in milliseconds, ms) it takes to consider an http request as timed-out. If no segment is shown, try increasing this timeout. |
Dynamische API-sleutelโ
Als je de API-sleutel niet in je configuratie wilt opnemen, kun je de volgende aanpassing doen.
- json
- yaml
- toml
{
"options": {
"url": "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={{ .Env.WAKATIME_API_KEY }}",
"http_timeout": 500
}
}
options:
url: https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={{
.Env.WAKATIME_API_KEY }}
http_timeout: 500
[options]
url = "https://wakatime.com/api/v1/users/current/summaries?start=today&end=today&api_key={{ .Env.WAKATIME_API_KEY }}"
http_timeout = 500
opmerking
WAKATIME_API_KEY is een voorbeeld, elke naam is mogelijk en acceptabel zolang de omgevingsvariabele bestaat en de API-sleutelwaarde bevat.
Raadpleeg de pagina Omgevingsvariabele voor meer informatie.
Template (informatie)โ
standaard template
{{ secondsRound .CumulativeTotal.Seconds }}
Eigenschappenโ
| Name | Type | Description |
|---|---|---|
.CumulativeTotal | wtTotals | object holding total tracked time values |
wtTotals Eigenschappenโ
| Name | Type | Description |
|---|---|---|
.Seconds | float64 | a number representing the total tracked time in seconds |
.Text | string | a string with human readable tracked time (eg: "2 hrs 30 mins") |