+++ /dev/null
-#!/bin/zsh
-
-# Copyright 2014 - 2016 Paul Hänsch
-#
-# This file is part of Serve0.
-#
-# Serve0 is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Affero General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Serve0 is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Affero General Public License for more details.
-#
-# You should have received a copy of the GNU Affero General Public License
-# along with Serve0. If not, see <http://www.gnu.org/licenses/>.
-
-. $_EXEC/pages/common.sh
-
-LF='
-'
-filters="${_GET[f]}"
-debug "FILTERS: $filters"
-
-present_filter(){
- printf %s "$*" |sed -nr '1s;^.*(\?|&)o=([^&]+)&?.*$;by \2: ;p'
-
- printf %s "$*" \
- | sed -nr '1s;^.*(\?|&)f=([^&]+)&?.*$;\2;p' \
- | sed -r 's;(^|!|\^|\|)([^!\^\|:]+:);\1;g;s;\^;\n;g' \
- | sort -r \
- | sed -r ':X;N;$!bX;s;\n; \&\; ;g'
-}
-
-quicklinks(){
- output=''
- tac ${_DATA}/meta/recent \
- | while [ "$(printf %s "$output" |wc -l)" -lt 30 ] && read line; do
- norm="$(present_filter "$line")"
- printf %s "$output" |grep -qF "$norm" || output="$output$line $norm$LF"
- done
- printf %s "$output" |while read line norm; do
- printf '<input type="checkbox"><a target="blank" href="%s">%s</a>' \
- "$line" "${norm}"
- done
-}
-
-category_selected(){
- cat="${1}:"
- filter="$2"
- [ "$cat" = "none:" ] && cat=''
-
- printf %s "$taglist_filter" \
- | sed -r 's;^('"$filter"')$;1 &;;t;s;^;0 ;' \
- | sed -rn 's;^(0|1) '"$cat"'([^:]+)$;\1 \2;p' \
- | sed 's;^0 ;<option>;;s;^1 ;<option selected>;;s;$;</option>;'
-}
-