1
0
Fork 0

хозяйственная работа: некоторый младший щипает здесь и там

This commit is contained in:
Arthur K. 2026-01-27 14:24:29 +03:00
parent 1d4bb2a118
commit 7f7d10aeee
Signed by: wzray
GPG key ID: B97F30FDC4636357
7 changed files with 60 additions and 30 deletions

View file

@ -1,9 +1,15 @@
#!/bin/bash
format() {
sed -e 's/^fix:/доза:/' \
-e '/^# ------------------------ >8 ------------------------$/,$d' \
-e '/^#/d'
}
translated="$(curl -s \
http://localhost:9000/translate \
-H 'Content-Type: text/html' \
--data-binary @- -o- < <(sed 's,^fix:,доза:,' < "$1") | \
--data-binary @- -o- < <(format < "$1") | \
tail -n +2 | \
perl -pe 's,<SPAN CLASS=UNKNOWN_WORD>(.*?)</SPAN>,\1,g')"