-Subproject commit d214859aadb31a565718da69754ad2573fa3f917
+Subproject commit fcb3e2096bd811a910c686bbfe181708878ba8b4
FILTER="$(GET f)"
SEARCH="$(GET s)"
-ORDER="$(GET o |grep -m1 -xE 'Date|Name|Length' || printf Name)"
-LISTSIZE="$(COOKIE pagesize |grep -m1 -xE '[1-9][0-9]*' || printf 50)"
+ORDER="$(GET o |grep -m1 -axE 'Date|Name|Length' || printf Name)"
+LISTSIZE="$(COOKIE pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 50)"
ITEM="$(PATH "${PATH_INFO#/}")"
case $(GET a) in
setprefs)
- SET_COOKIE +$((86400 * 90)) pagesize="$(POST pagesize |grep -m1 -xE '[1-9][0-9]*' || printf 50)"
- SET_COOKIE +$((86400 * 90)) mode="$(POST mode |grep -m1 -xE 'browse|index' || printf browse)"
- SET_COOKIE +$((86400 * 90)) fakemp4="$(POST fakemp4 |grep -m1 -xE 'yes' || printf no)"
+ SET_COOKIE +$((86400 * 90)) pagesize="$(POST pagesize |grep -m1 -axE '[1-9][0-9]*' || printf 50)"
+ SET_COOKIE +$((86400 * 90)) mode="$(POST mode |grep -m1 -axE 'browse|index' || printf browse)"
+ SET_COOKIE +$((86400 * 90)) fakemp4="$(POST fakemp4 |grep -m1 -axE 'yes' || printf no)"
REDIRECT "$(POST ref)"
;;
esac
if [ -d "${meta%/meta}" ]; then
grep -aF " $(meta_name "$file")" "$meta" \
- | grep -m1 -xE '[0-9]+ [0-9]+ [0-9]+ tags=[^ ]* comment=[^ ]* .+' \
+ | grep -m1 -axE '[0-9]+ [0-9]+ [0-9]+ tags=[^ ]* comment=[^ ]* .+' \
|| meta_file "$file"
else
printf '0\t0\t0\ttags=\tcomment=\t\r'
if [ -d "$dir/.index" -a \! -f "$meta" ] && LOCK "$meta"; then
touch "$meta" # preliminary touch to prevent concurrent generators
find "$dir" -type f -mindepth 1 -maxdepth 1 \
- | grep -E "$file_pattern" \
+ | grep -aE "$file_pattern" \
| while v="$(line)"; do
meta_line "$v"
done >"$meta"
elif [ -d "$dir/.index" -a "$dir" -nt "$meta" ] && LOCK "$meta"; then
touch "$meta"
find "$dir" -type f -mindepth 1 -maxdepth 1 \
- | grep -E "$file_pattern" \
+ | grep -aE "$file_pattern" \
| while v="$(line)"; do
if [ "$v" -nt "$meta" ]; then
grep -qF " $(meta_name "$v")" "$meta" \
* {
box-sizing: border-box;
margin: 0; padding: 0;
+ text-align: left;
}
button { padding: .125em .5em; }
a { color: inherit; text-decoration: none;}
position: relative;
overflow: hidden;
height: 0;
- text-align: left;
background-color: #333;
}
#prefs:target,
line-height: 2em;
background-color: inherit;
border-bottom: 1px solid;
- text-align: left;
padding-left: .5em;
position: relative;
top: -2em;
padding: .5em 1em;
background-color: #444;
line-height: 1.5em;
- text-align: left;
}
#advsearch input.and {display: none;}
min-width: 200px;
min-height: 12em;
overflow: hidden;
- text-align: left;
vertical-align: top;
}
background-color: #4F4;
}
+.itemlist,
.pagination {
display: block;
text-align: center;
}
#editing {
- text-align: left;
width: 100%;
background-color: #333;
border-top: 1px solid;
$n "$category" "$t" "$lbid" "$lbid" "$category" $n
printf '%s\n' "$w_tags" \
- | { [ "$category" = '*' ] && grep -vF ':' |grep -vxF '' || grep -wF "${category}"; } \
+ | { [ "$category" = '*' ] && grep -avF ':' |grep -avxF '' || grep -awF "${category}"; } \
| while read -r tag; do
t=''; [ ! "${f%%*|${tag}|*}" ] && t=checked
printf '[option %s value="%s"\n%s]' "$t" "$tag" "${tag#*:}"
| while read -r category; do
printf '[fieldset [legend %s:][select name=tag size=4 multiple' "$category"
printf %s "$w_tags" \
- | { [ "$category" = 'Tags' ] && grep -vF ':' | grep -vxF '' || grep -wF "${category}"; } \
+ | { [ "$category" = 'Tags' ] && grep -avF ':' | grep -avxF '' || grep -awF "${category}"; } \
| while read -r tag; do
printf '[option value="%s"\n%s]' "$tag" "${tag#*:}"
done