"$link" "$link" "${name##/}" \
"$((length / 60))" "$((length % 60))" \
"$width" "$height" \
- "$(printf '%s\n' "${tags#tags=}" \
- | sed -r "$UNSTRING"' s;^;,;; s;,+;,;g; s;,$;;;
+ "$(UNSTRING "${tags#tags=}" \
+ | sed -r 's;^;,;; s;,+;,;g; s;,$;;;
:X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;'
)" "$name" "$link" "$link"
else
- printf 'Canning record for nonexist file: %s\n' "$name" >&2
+ debug "Canning record for nonexist file: $name"
meta_purge "$_DATA/$ITEM/$name"
fi
}
STRING "$FILTER^" \
| sed -E 's;\^;\n;g; s;[]\/\(\)\\\^\$\?\.\+\*\;\[\{\}];\\&;g' \
| while read -r f; do
- [ "${f#\~}" ] || continue
- [ "${f#\~}" = "$f" ] \
- && fex="/(\ttags=([^\t]*,)?)(${f})((,[^\t]*)?\t)/{${fex}}" \
- || fex="/(\ttags=([^\t]*,)?)(${f#\~})((,[^\t]*)?\t)/d; ${fex}"
+ [ "${f##*[A-Z]*}" ] && tl="y;ABCDEFGHIJKLMNOPQRSTUVWXYZ;abcdefghijklmnopqrstuvwxyz;;"
+ case $f in
+ ''|~) continue;;
+ ~\\\$:*) fex="h; ${tl} /${f#~\\\$:}/d; g;${fex}";;
+ \\\$:*) fex="h; ${tl} /${f#\\\$:}/{g;${fex}}";;
+ ~*) fex="/(\ttags=([^\t]*,)?)(${f#\~})((,[^\t]*)?\t)/d; ${fex}";;
+ *) fex="/(\ttags=([^\t]*,)?)(${f})((,[^\t]*)?\t)/{${fex}}";;
+ esac
printf '%s\n' "${fex}"
done \
| tail -n1
list_filter(){
if [ "$FILTER" ]; then
- printf "FEX: %s\n" "$list_fex" >&2
+ debug "FEX:" "$list_fex"
sed -nE "$list_fex"
elif [ "${SEARCH#!}" != "${SEARCH}" ]; then
grep -aviEe "$(STRING "${SEARCH}" \
printf ' by %s]' "$ORDER"
printf '
[meta name="viewport" content="width=device-width"]
+ [link rel=stylesheet href="/cgilite/common.css" ]
[link rel=stylesheet href="/style.css" ]
] [body
[div #navigation
[a #t_bookmarks href="#bookmarks" ★]'
w_search
printf '
- [a #t_avsearch href="#advsearch" Advanced]
[a #t_prefs href="#prefs" ⚙]
]'
w_bookmarks