Browse Source

Add wthr.ml

master
Kevin Mok 5 years ago
parent
commit
92df36760b
Signed by: Kevin-Mok GPG Key ID: AEA75288DC135CF5
  1. 6
      .gitignore
  2. 4
      README.md
  3. 2
      server-pages-test.csv
  4. 8
      server-pages.csv
  5. 1
      server-status.js

6
.gitignore

@ -1,3 +1,7 @@
server-pages-test.csv
# npm {{{ -
/lib
/lib-legacy
/node_modules
@ -26,3 +30,5 @@ test/fixtures/**/.fbkpm
.pnp
/packages/lockfile/index.js
.vscode/
# }}} npm -

4
README.md

@ -31,8 +31,8 @@ following output:
## Built With
* [csvtojson] - Convert my base CSV to JSON.
* [url-metadata] - Fetch my pages for their titles.
* [csvtojson]
* [url-metadata] - Fetch pages for their titles.
[csvtojson]: https://www.npmjs.com/package/csvtojson
[url-metadata]: https://www.npmjs.com/package/url-metadata

2
server-pages-test.csv

@ -1,2 +0,0 @@
shortUrl,url,siteTitle,description,repo,repoUrl
kevin-mok.com,https://kevin-mok.com," Kevin Mok ","Personal site (this site).",Kevin-Mok/my-site,https://git.kevin-mok.com/Kevin-Mok/my-site

8
server-pages.csv

@ -1,9 +1,11 @@
shortUrl,url,siteTitle,description,repo,repoUrl
kevin-mok.com,https://kevin-mok.com," Kevin Mok ","Personal site (this site).",Kevin-Mok/my-site,https://git.kevin-mok.com/Kevin-Mok/my-site
git.kevin-mok.com,https://git.kevin-mok.com,"Kevin Mok's Gitea","Lightweight Git server.",go-gitea/gitea,https://github.com/go-gitea/gitea
cal.khkm.tk,https://cal.khkm.tk,"Baïkal server","CalDAV/CardDAV server.",sabre-io/Baikal,https://github.com/sabre-io/Baikal
git.kevin-mok.com,https://git.kevin-mok.com,"Kevin Mok's Gitea","Git server.",go-gitea/gitea,https://github.com/go-gitea/gitea
img.khkm.tk,https://img.khkm.tk,"Kevin's Images","Image hosting.",LycheeOrg/Lychee,https://github.com/LycheeOrg/Lychee/
kevin-mok.com,https://kevin-mok.com," Kevin Mok ","Personal site (this site).",Kevin-Mok/my-site,https://git.kevin-mok.com/Kevin-Mok/my-site
matrix.ataraxy.tk,https://matrix.ataraxy.tk/.well-known/matrix/server,,"Matrix chat server. Only accessible through Riot client.",matrix-org/synapse,https://github.com/matrix-org/synapse
mnpd.gq,https://mnpd.gq/test,"test","Minimalistic live web notepad.",pereorga/minimalist-web-notepad,https://github.com/pereorga/minimalist-web-notepad
mnpd.gq,https://mnpd.gq/test,"test","Minimalistic live notepad.",pereorga/minimalist-web-notepad,https://github.com/pereorga/minimalist-web-notepad
pste.gq,https://pste.gq,"hastebin","Pastebin.",seejohnrun/haste-server,https://github.com/seejohnrun/haste-server
smol.gq,https://smol.gq,"Kevin's URL Shortener","URL shortener.",132ikl/liteshort,https://github.com/132ikl/liteshort
taskd.khkm.tk,taskd.khkm.tk:53589,,"Taskwarrior (task manager) server. No web interface.",GothenburgBitFactory/taskserver,https://github.com/GothenburgBitFactory/taskserver
wthr.ml,https://wthr.ml/,," <code>curl</code>-friendly, local weather info. <a href="https://regexr.com/4mgna" target="_blank"><code>\/m?t?v?</code></a> are all valid endings.",Kevin-Mok/weather,https://git.kevin-mok.com/Kevin-Mok/weather

1
server-status.js

@ -10,6 +10,7 @@ const csvFilePath = 'server-pages.csv'
// consider webpage to be up if stored title matches fetched title
const checkIfTitleMatches = obj => {
return urlMetadata(obj['url']).then(metadata => { // success handler
// log(metadata.title, obj['siteTitle'])
if (metadata.title == obj['siteTitle']) {
obj['status'] = 'up'
} else {

Loading…
Cancel
Save