Test server pages function

Highest Watson projects alias.
This commit is contained in:
2019-09-05 13:45:59 -04:00
parent 37ba6b8dcf
commit 82018d00a3
7 changed files with 41 additions and 10 deletions

View File

@@ -100,6 +100,7 @@ abbr ae "task-edit"
abbr adl "task-delete"
abbr adn "task-done"
abbr an "task-next"
abbr ant "task-notes"
abbr apr "task-mod-pri"
abbr apj "task-mod-proj"
abbr at "task-mod-tag"

View File

@@ -0,0 +1,17 @@
function server-pages
set sites git.ataraxy.tk khkm.tk cal.khkm.tk mnpd.gq/k-bg pste.gq smol.gq twem.tk
set titles "Kevin Mok's Gitea" "Kevin Mok" "Baïkal server" "k-bg" "hastebin" "Kevin's URL Shortener" "Index of /"
# set sites mnpd.gq/k-bg
# set titles "k-bg"
for i in (seq (count $sites))
set title (wget -qO- "$sites[$i]" | perl -l -0777 -ne 'print $1 if /<title.*?>\s*(.*?)\s*<\/title/si' | recode html)
if test $title = $titles[$i]
set symbol "✓"
else
set symbol "✗"
end
printf "[$symbol] $sites[$i]\n"
end
end

View File

@@ -0,0 +1,4 @@
function task-notes
task $argv[1] annotate Notes
and taskopen $argv[1]
end