Compare commits

...

3 Commits

Author SHA1 Message Date
6b47008dbd Img/alphabetize 2024-05-22 13:53:47 -04:00
34bc13b5fc Update for AWS 2024-05-21 10:26:45 -04:00
f668efb218 Fix JSON by not outputting error 2020-08-22 04:30:38 -04:00
3 changed files with 11 additions and 10 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
server-pages-test.csv
server-pages-*.csv
# npm {{{ -

View File

@@ -1,11 +1,6 @@
shortUrl,url,siteTitle,description,repo,repoUrl
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 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
img.khkm.dev,https://img.khkm.dev/gallery,"Loading..","Image hosting.",bpatrik/pigallery2,https://github.com/bpatrik/pigallery2
paste.khkm.dev,https://paste.khkm.dev,"Paste a password, confidential message, or private data.","Pastebin.",HemmeligOrg/Hemmelig.app,https://github.com/HemmeligOrg/Hemmelig.app
short.khkm.dev,https://short.khkm.dev,"liteshort","URL shortener.",132ikl/liteshort,https://github.com/132ikl/liteshort
Can't render this file because it contains an unexpected character in line 11 and column 85.

View File

@@ -9,6 +9,8 @@ const csvFilePath = 'server-pages.csv'
// consider webpage to be up if stored title matches fetched title
const checkIfTitleMatches = obj => {
// console.log(obj['url'])
// console.log(urlMetadata(obj['url']))
return urlMetadata(obj['url']).then(metadata => { // success handler
// log(metadata.title, obj['siteTitle'])
if (metadata.title == obj['siteTitle']) {
@@ -16,10 +18,14 @@ const checkIfTitleMatches = obj => {
} else {
obj['status'] = 'down'
}
return true
// return true
},
error => { // failure handler
console.log(error)
obj['status'] = 'down'
// return false
}).catch(function(err) {
console.log(err);
})
}