Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[new feature] using espeak to say log #3620

Closed
eschultze opened this issue Aug 11, 2016 · 6 comments
Closed

[new feature] using espeak to say log #3620

eschultze opened this issue Aug 11, 2016 · 6 comments

Comments

@eschultze
Copy link

I have been using the bot like this

python pokecli.py -cf configs/config.json | tee LOG

On another terminal I run

tail -f LOG | while read line ; do echo $line | grep -oE ".*A wild.*appeared.*" | cut -d' ' -f2-9| espeak ; done

Every time "A wild $POKEMON appears" it says it using espeak

Does anyone would like to integrate this with the bot? maybe using another language... I can help if I'm able to, but my python skills are very bad :(

@Dracon23
Copy link

Not too sure how this would be handled on a headless machine, but this surely is an interesting approach to alerting the user ;F

@vanishing
Copy link
Contributor

vanishing commented Aug 11, 2016

Don't think this is really necessary, you can whip up a quick shell script to do this:

#!/bin/bash
filename="$1"
message="$2"
tail -f $filename | egrep --line-buffered $message | while read line 
do
    espeak $line
done 

Run it with:
./script [logfile path] [message to look for]

@cyberhck
Copy link

I don't think this is really required, we can just use notify-send in linux distros to notify about new pokemons but saying out loud, might not be required at all :)

@k4n30
Copy link
Contributor

k4n30 commented Aug 18, 2016

@eschultze It doesn't look like anyone is willing to help out. How would you like to proceed? Do you want to give it a go yourself?

@jrjhealey
Copy link

It looks to me like the shell scripting for this is A) easy, and B) done!

I'd say this can be closed, and if the functionality is still really desired, I suggest you offer up a PR and the devs can decide to include it or not.

@eschultze
Copy link
Author

Sorry for the delay. I was going to close it as well.

Thanks for the reviews and comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants