feat(cli): booth blur <name> with no files fogs the whole booth
The operator: "per booth blurring is now important since we are showing up to 4 images." The Desk is why. Measured on the live set: 84 images across 22 booths on the page he opens first, 10 of them blurred. Before the redesign the index showed one cover per booth; four-up multiplies the exposure by four, and NOTHING POSTED BEFORE THE REDESIGN OPTED INTO THAT. The storage landed with the flag; this is the half that makes it usable before design-dev's control ships. Seventeen handles call this script, so a session posting sensitive work can self-blur AT POST TIME — which is the durable fix, because the operator should not have to police 22 booths by hand. No files named means the whole booth, which is the mental model already: `blur <name> <file>...` was per item and required two arguments, so one argument could only ever have been an error. COMPOSES with the per-item list: `unblur <name>` clears the flag and leaves individual choices exactly as they were, the same promise the resolver makes. Also records both rulings routed this turn: x hides with the other Desk controls, and the theme toggle reaches the chrome inside verbatim pages. Verified under the system python3 with no venv, which is the only way most callers ever run it.
This commit is contained in:
+22
-2
@@ -240,7 +240,7 @@ sys.stdout.write("N" if name is None else "B:" + name)
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "usage: booth {new <name> [--why W] [--title T]|add <name> <file>... [--why W] [--title T]|url <name>|ls|rm <name>|keep <name>|unkeep <name>|blur <name> <file>...|unblur <name> <file>...|link <url> [description]|links|unlink <id|index>|ask <name> <id> <prompt> <option>... [--no-notes]|marks <name> [--wait [SECS]]|asks <name> (deprecated alias for marks)|answer <name> <id> [--wait [SECS]]|marks-import <name>|bench add <url> <name>|bench ls|bench state <id|url> <live|promoted|retired>|bench rm <id|url>|bench import [--apply <id>...]}" >&2
|
||||
echo "usage: booth {new <name> [--why W] [--title T]|add <name> <file>... [--why W] [--title T]|url <name>|ls|rm <name>|keep <name>|unkeep <name>|blur <name> [<file>...]|unblur <name> [<file>...]|link <url> [description]|links|unlink <id|index>|ask <name> <id> <prompt> <option>... [--no-notes]|marks <name> [--wait [SECS]]|asks <name> (deprecated alias for marks)|answer <name> <id> [--wait [SECS]]|marks-import <name>|bench add <url> <name>|bench ls|bench state <id|url> <live|promoted|retired>|bench rm <id|url>|bench import [--apply <id>...]}" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
@@ -303,10 +303,30 @@ case "$cmd" in
|
||||
# screen-share, a scroll past something you did not want full-size. The
|
||||
# Booth has no auth by design: if a thing must not be SEEN, it must not be
|
||||
# in a booth.
|
||||
[ $# -ge 2 ] || usage
|
||||
[ $# -ge 1 ] || usage
|
||||
b="$1"; shift
|
||||
[ -d "$DATA/$b" ] || { echo "no such booth: $b" >&2; exit 1; }
|
||||
f="$DATA/$b/$BLUR"
|
||||
|
||||
# NO FILES NAMED = THE WHOLE BOOTH. The Desk shows up to four images from
|
||||
# every booth on the page the operator opens first, so a booth that should
|
||||
# not be glanced at needs to say so as a BOOTH, not item by item — and the
|
||||
# session that posts it is the one that knows.
|
||||
#
|
||||
# A marker, and it COMPOSES with the per-item list rather than replacing
|
||||
# it: `unblur <name>` clears the booth flag and leaves individual choices
|
||||
# exactly as they were.
|
||||
if [ $# -eq 0 ]; then
|
||||
if [ "$cmd" = blur ]; then
|
||||
touch "$DATA/$b/.blurbooth"
|
||||
echo "whole booth blurred (cosmetic — still served): $URL/b/$b/"
|
||||
else
|
||||
rm -f -- "$DATA/$b/.blurbooth"
|
||||
echo "whole booth un-blurred (per-item blur kept): $URL/b/$b/"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
for item in "$@"; do
|
||||
item="${item#"$DATA/$b/"}"; item="${item#/}"
|
||||
case "$item" in
|
||||
|
||||
Reference in New Issue
Block a user