Simplify usage
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,4 +1,6 @@
|
|||||||
**
|
**
|
||||||
|
!install.sh
|
||||||
|
!easy-playback.sh
|
||||||
!edge-tts.py
|
!edge-tts.py
|
||||||
!LICENSE
|
!LICENSE
|
||||||
!sample
|
!sample
|
||||||
|
|||||||
7
easy-playback.sh
Executable file
7
easy-playback.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
## To use this script you need to install
|
||||||
|
## edge-tts.py to a directory in your $PATH
|
||||||
|
## as executable and give it the name edge-tts
|
||||||
|
trap 'kill -- $(jobs -p) 2>/dev/null' EXIT
|
||||||
|
exec {fd}< <(edge-tts "${@}")
|
||||||
|
mpg123 -C "/dev/fd/$fd"
|
||||||
9
install.sh
Executable file
9
install.sh
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
{ [ -e "edge-tts.py" ] && [ -e "easy-playback.sh" ]; } || { echo "Script needs to be run on root of the repo" >&2; exit 1; }
|
||||||
|
[ -z "$1" ] && { echo "You need to specify the install path." >&2; exit 1; }
|
||||||
|
mkdir -p -- "$1" 2>/dev/null
|
||||||
|
rm -f -- "$1/edge-tts" "$1/easy-playback"
|
||||||
|
cp -f -- edge-tts.py "$1/edge-tts"
|
||||||
|
cp -f -- easy-playback.sh "$1/edge-playback"
|
||||||
|
chmod +x -- "$1/edge-tts" "$1/edge-playback"
|
||||||
|
exit 0
|
||||||
Reference in New Issue
Block a user