mathiasbynens / mathiasbynens/dotfiles
`gsay` function (use Google’s Translate API to say things)
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 31.5k
- Forks
- 8.4k
- PR merge metrics
- No merged PRs in 30d
Description
``` bash
function gsay { local lang=nl str="$*" tmp="/tmp/gsay.$$.mp3" i=0 line; [ -t 0 ] || str="$(cat)"; fmt -w 100 <<< "$str" | while read -r line; do url="http://translate.google.com/translate_tts?ie=UTF-8&tl=$lang&q=${line//&/%26}"; url="${url// /+}"; curl -sH 'User-Agent: Notabot' "$url" >| "$tmp" && afplay "$tmp"; done; rm -f "$tmp"; }
```
/by @janmoesen
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue only provides a Bash function named gsay and does not identify a repository file, test, or explicit acceptance criteria. First locate where shell functions are defined, then clarify the intended behavior and how the Google Translate speech output should be integrated before implementing and verifying it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, macos, shell
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100