From 728181c41598130adea8070b423a3f6c38040015 Mon Sep 17 00:00:00 2001 From: n9k Date: Sat, 25 Jun 2022 09:17:13 +0000 Subject: [PATCH 01/11] Error pages: minor css change --- anonstream/templates/error.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anonstream/templates/error.html b/anonstream/templates/error.html index dc02fe7..e8fb936 100644 --- a/anonstream/templates/error.html +++ b/anonstream/templates/error.html @@ -9,7 +9,7 @@ color: #ddd; font-family: sans-serif; font-size: 14pt; - margin: 4pt 6pt; + margin: 3pt 6pt; text-align: center; text-shadow: 2px 0px 1px orangered; } From dd94bc723302f37de75afded351013c5899453d8 Mon Sep 17 00:00:00 2001 From: n9k Date: Sat, 25 Jun 2022 09:39:40 +0000 Subject: [PATCH 02/11] Minor whitespace --- anonstream/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/anonstream/__init__.py b/anonstream/__init__.py index f918218..a6f34c0 100644 --- a/anonstream/__init__.py +++ b/anonstream/__init__.py @@ -75,7 +75,7 @@ def create_app(toml_config): from anonstream.events import start_event_server_at async def start_event_server(): return await start_event_server_at( - app.config['SOCKET_EVENT_ADDRESS'] + app.config['SOCKET_EVENT_ADDRESS'] ) app.add_background_task(start_event_server) From 4034b6a79ed146ba1ebb3a7274017731727d10e3 Mon Sep 17 00:00:00 2001 From: n9k Date: Sun, 26 Jun 2022 04:12:32 +0000 Subject: [PATCH 03/11] HACKING.md: use `socat -u` in examples --- HACKING.md | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/HACKING.md b/HACKING.md index f2136b2..fd88c66 100644 --- a/HACKING.md +++ b/HACKING.md @@ -32,31 +32,21 @@ on chat, e.g. text-to-speech or Twitch Plays Pokémon. View events like this: ```sh -socat UNIX-CONNECT:event.sock STDOUT +socat -u UNIX-CONNECT:event.sock STDOUT ``` -Sidenote, this will still read from stdin, and if you send anything on -stdin the event socket will close itself. If you want to ignore stdin, -I couldn't figure out how to get `socat` to do it so you can do it like -this: -```sh -cat > /dev/null | socat UNIX-CONNECT:event.sock STDOUT -``` -If you do this `cat` will not exit when the connection is closed so you -will probably have to interrupt it with `^C`. - #### Examples If you have `jq` you can view prettified events like this: ```sh -socat UNIX-CONNECT:event.sock STDOUT | jq +socat -u UNIX-CONNECT:event.sock STDOUT | jq ``` (On older versions of `jq` you have to say `jq .` when reading from stdin.) Use this to get each new chat message on a new line: ```sh -socat UNIX-CONNECT:event.sock STDOUT | jq 'select(.type == "message") | .event.nomarkup' +socat -u UNIX-CONNECT:event.sock STDOUT | jq 'select(.type == "message") | .event.nomarkup' ``` ##### Text-to-speech @@ -65,7 +55,7 @@ This command will take each new chat message with the prefix "!say ", strip the prefix, and synthesize the rest of the message as speech using `espeak`: ```sh -socat UNIX-CONNECT:event.sock STDOUT \ +socat -u UNIX-CONNECT:event.sock STDOUT \ | jq --unbuffered 'select(.type == "message") | .event.nomarkup' \ | grep -E --line-buffered '^"!say ' \ | sed -Eu 's/^"!say /"/' \ From d91b49fb2957120c31429db1ddb5469930e16fc6 Mon Sep 17 00:00:00 2001 From: n9k Date: Wed, 29 Jun 2022 02:25:22 +0000 Subject: [PATCH 04/11] Forgot meta viewport in new templates --- anonstream/templates/captcha.html | 1 + anonstream/templates/error.html | 1 + 2 files changed, 2 insertions(+) diff --git a/anonstream/templates/captcha.html b/anonstream/templates/captcha.html index 6a6058b..0894b4e 100644 --- a/anonstream/templates/captcha.html +++ b/anonstream/templates/captcha.html @@ -2,6 +2,7 @@ +