+ <%= dataObject.timeUTCHumanReadable %>
+
+ diff --git a/README.md b/README.md index 30564fd9..38e0829c 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
| - đ§Š 19 plugins + đ§Š 20 plugins | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| đŧ Music plugin | -âąī¸ Website performances | +đ Nightscout | ||||||||||||||||||||||||||||
|
@@ -112,6 +112,16 @@ Generate your metrics that you can embed everywhere, including your GitHub profi
|
+
+ |
+ |||||||||||||||||||||||||||||
| âąī¸ Website performances | +đ§âđ¤âđ§ People plugin | +|||||||||||||||||||||||||||||
Detailed version@@ -122,12 +132,6 @@ Generate your metrics that you can embed everywhere, including your GitHub profi |
- ||||||||||||||||||||||||||||||
| đ§âđ¤âđ§ People plugin | -âī¸ Recent posts | -|||||||||||||||||||||||||||||
Followed people version@@ -141,34 +145,40 @@ Generate your metrics that you can embed everywhere, including your GitHub profi |
+ ||||||||||||||||||||||||||||||
| âī¸ Recent posts | +đī¸ Projects | +|||||||||||||||||||||||||||||
|
|
- ||||||||||||||||||||||||||||||
| đī¸ Projects | -⨠Stargazers over last weeks | -|||||||||||||||||||||||||||||
|
|
+ ||||||||||||||||||||||||||||||
| ⨠Stargazers over last weeks | +đ Recently starred repositories | +|||||||||||||||||||||||||||||
|
|
- ||||||||||||||||||||||||||||||
| đ Recently starred repositories | -đ Starred topics | -|||||||||||||||||||||||||||||
|
|
+ ||||||||||||||||||||||||||||||
| đ Starred topics | +đ§Ž Repositories traffic | +|||||||||||||||||||||||||||||
Mastered and known technologies version@@ -176,30 +186,23 @@ Generate your metrics that you can embed everywhere, including your GitHub profi |
- ||||||||||||||||||||||||||||||
| đ§Ž Repositories traffic | -đ¤ Latest tweets | -|||||||||||||||||||||||||||||
|
|
+ ||||||||||||||||||||||||||||||
| đ¤ Latest tweets | +â° WakaTime plugin | +|||||||||||||||||||||||||||||
|
|
- ||||||||||||||||||||||||||||||
| â° WakaTime plugin | -- | |||||||||||||||||||||||||||||
|
|
- ||||||||||||||||||||||||||||||
| @@ -551,6 +554,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1 | đˇī¸ | đ¨âđģ | đŧ | +đ | âąī¸ | đ§âđ¤âđ§ | âī¸ | @@ -574,6 +578,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1âī¸ | âī¸ | âī¸ | +âī¸ | âī¸ | âī¸ | âī¸ | @@ -597,6 +602,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1âī¸ | âī¸ | â | +â | âī¸ | âī¸ | â | @@ -620,6 +626,7 @@ https://my-personal-domain.com/my-github-user?base=0&base.repositories=1âī¸ | âī¸ | â | +â | âī¸ | â | â | @@ -659,6 +666,7 @@ See their respective documentation for more informations about how to setup them * [đˇī¸ Most used languages](/source/plugins/languages/README.md) * [đ¨âđģ Lines of code changed](/source/plugins/lines/README.md) * [đŧ Music plugin](/source/plugins/music/README.md) +* [đ Nightscout](/source/plugins/nightscout/README.md) * [âąī¸ Website performances](/source/plugins/pagespeed/README.md) * [đ§âđ¤âđ§ People plugin](/source/plugins/people/README.md) * [âī¸ Recent posts](/source/plugins/posts/README.md) diff --git a/action.yml b/action.yml index 57138ab6..2b5ce47f 100644 --- a/action.yml +++ b/action.yml @@ -365,6 +365,44 @@ inputs: description: Music provider username default: .user.login + # ==================================================================================== + # đ Nightscout + + # Enable or disable plugin + plugin_nightscout: + description: Displays Blood Glucose + default: no + + # Nightscout site URL + plugin_nightscout_url: + description: Your Nightscout site URL + default: https://example.herokuapp.com + + # Controls how big the graph is + plugin_nightscout_datapoints: + description: How many datapoints to show on the graph. 0 and 1 disable the graph. + default: 12 + + # Low value used for colors and text alerts + plugin_nightscout_lowalert: + description: When the blood sugar is considered low + default: 80 + + # High value used for colors and text alerts + plugin_nightscout_highalert: + description: When the blood sugar is considered high + default: 180 + + # Urgent low value used for colors and text alerts + plugin_nightscout_urgentlowalert: + description: When the blood sugar is considered urgently low + default: 50 + + # Urgent high value used for colors and text alerts + plugin_nightscout_urgenthighalert: + description: When the blood sugar is considered urgently high + default: 250 + # ==================================================================================== # âąī¸ Website performances diff --git a/settings.example.json b/settings.example.json index ececa048..333cf511 100644 --- a/settings.example.json +++ b/settings.example.json @@ -49,6 +49,9 @@ "token": null, "//":"Music provider personal token", "enabled": false, "//": "Display your music tracks" }, + "nightscout":{ + "enabled": false, "//": "Displays Blood Glucose" + }, "pagespeed":{ "token": null, "//":"PageSpeed token", "enabled": false, "//": "Display a website Google PageSpeed metrics" diff --git a/source/app/mocks/api/axios/get/nightscout.mjs b/source/app/mocks/api/axios/get/nightscout.mjs new file mode 100644 index 00000000..1662408d --- /dev/null +++ b/source/app/mocks/api/axios/get/nightscout.mjs @@ -0,0 +1,31 @@ +/**Mocked data */ +export default function({faker, url}) { + //Last.fm api + if (/^https:..testapp.herokuapp.com.*$/.test(url)) { + //Get Nightscout Data + console.debug(`metrics/compute/mocks > mocking nightscout api result > ${url}`) + const lastInterval = Math.floor(new Date() / 300000) * 300000 + const directionArray = ["SingleUp", "DoubleUp", "FortyFiveUp", "Flat", "FortyFiveDown", "SingleDown", "DoubleDown"] + return ({ + status:200, + data:{ + data:[{ + _id:faker.git.commitSha().substring(0, 23), + device:"xDrip-DexcomG5", + date:lastInterval, + dateString:new Date(lastInterval).toISOString(), + sgv:faker.random.number({min:40, max:400}), + delta:faker.random.number({min:-10, max:10}), + direction:directionArray[Math.floor(Math.random() * directionArray.length)], + type:"sgv", + filtered:0, + unfiltered:0, + rssi:100, + noise:1, + sysTime:new Date(lastInterval).toISOString(), + utcOffset:faker.random.number({min:-12, max:14})*60, + }], + }, + }) + } + } \ No newline at end of file diff --git a/source/app/web/statics/app.placeholder.js b/source/app/web/statics/app.placeholder.js index 2d21f03c..5c41ba10 100644 --- a/source/app/web/statics/app.placeholder.js +++ b/source/app/web/statics/app.placeholder.js @@ -257,6 +257,17 @@ })) } }) : null), + //Nightscout + ...(set.plugins.enabled.nightscout ? ({ + nightscout:{ + url: options["nightscout.url"] != null && options["nightscout.url"] != "https://example.herokuapp.com" ? options["nightscout.url"]: "https://testapp.herokuapp.com/", + datapoints: faker.random.number({min: 8, max: 12}), + lowalert: faker.random.number({min: 60, max: 90}), + highalert: faker.random.number({min: 150, max: 200}), + urgentlowalert: faker.random.number({min: 40, max: 59}), + urgenthighalert: faker.random.number({min: 201, max: 300}) + } + }) : null), //Pagespeed ...(set.plugins.enabled.pagespeed ? ({ pagespeed:{ diff --git a/source/plugins/README.md b/source/plugins/README.md index dc642e6d..c3e0d64a 100644 --- a/source/plugins/README.md +++ b/source/plugins/README.md @@ -14,6 +14,7 @@ See their respective documentation for more informations about how to setup them * [đˇī¸ Most used languages](/source/plugins/languages/README.md) * [đ¨âđģ Lines of code changed](/source/plugins/lines/README.md) * [đŧ Music plugin](/source/plugins/music/README.md) +* [đ Nightscout](/source/plugins/nightscout/README.md) * [âąī¸ Website performances](/source/plugins/pagespeed/README.md) * [đ§âđ¤âđ§ People plugin](/source/plugins/people/README.md) * [âī¸ Recent posts](/source/plugins/posts/README.md) diff --git a/source/plugins/nightscout/README.md b/source/plugins/nightscout/README.md new file mode 100644 index 00000000..3fda4bf0 --- /dev/null +++ b/source/plugins/nightscout/README.md @@ -0,0 +1,34 @@ +### đ Nightscout + +The *Nightscout* plugin lets you display blood sugar values from a [Nightscout](http://nightscout.info) site. + +||
|
+ |
+