diff --git a/.gitignore b/.gitignore index de14c1e..dbf871c 100644 --- a/.gitignore +++ b/.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 - diff --git a/README.md b/README.md index f1fa157..1384a3a 100644 --- a/README.md +++ b/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 diff --git a/server-pages-test.csv b/server-pages-test.csv deleted file mode 100644 index 6b8d85b..0000000 --- a/server-pages-test.csv +++ /dev/null @@ -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 diff --git a/server-pages.csv b/server-pages.csv index adcbf7e..8023171 100644 --- a/server-pages.csv +++ b/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/,," curl-friendly, local weather info. \/m?t?v? are all valid endings.",Kevin-Mok/weather,https://git.kevin-mok.com/Kevin-Mok/weather diff --git a/server-status.js b/server-status.js index e862489..e549cd0 100644 --- a/server-status.js +++ b/server-status.js @@ -10,7 +10,8 @@ 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 - if (metadata.title == obj['siteTitle']) { + // log(metadata.title, obj['siteTitle']) + if (metadata.title == obj['siteTitle']) { obj['status'] = 'up' } else { obj['status'] = 'down'