69 lines
2.1 KiB
Markdown
69 lines
2.1 KiB
Markdown
# Guessthesong
|
|
|
|
IRC bot and webapp running <a href="http://guessthesong.i2p" target="_blank">guessthesong.i2p</a> for submitting AI generated images made from song lyrics and guessing what the song is.
|
|
|
|
Bot can use either SAM or regular IRC proxy tunnel like 127.0.0.1:6668. For SAM enabled, hostname is the IRC address.
|
|
|
|
Finished songs will attempt to be grabbed using [soundcloak](https://git.maid.zone/stuff/soundcloak) instances in i2p.
|
|
|
|
|
|
git clone --config http.proxy=127.0.0.1:4444 http://git.simp.i2p/simp/guessthesong.git && cd guessthesong && python3 -m venv ./ && cd bin && source activate && cd .. && pip3 install -r requirements.txt
|
|
|
|
## Settings
|
|
Most of the game related commands are changed in IRC with !admin <setting>
|
|
|
|
[proxy]
|
|
hostname = 127.0.0.1
|
|
port = 4444 #http proxy tunnel for downloading images and audio
|
|
timeout = 600 #timout for audio download
|
|
sc_instances = sc.maid.i2p, soundcloak.neonw.i2p
|
|
|
|
[i2music]
|
|
music_player_url = music.simp.i2p
|
|
playlist = Guessthesong
|
|
filetype_ = opus
|
|
playlist_directory = /path/i2music/static/playlists/Guessthesong
|
|
update_playlist_script = /path/i2music
|
|
i2music_hostname = 127.0.0.1
|
|
i2music_gunicorn_port = 5001
|
|
i2music_flask_port = 5002
|
|
|
|
[settings]
|
|
secret_key = <changeit> #for flask
|
|
instance_url = somewebsite.i2p #can be changed in irc
|
|
flask_port = 5000 #for debugging only
|
|
ah = <address helper>
|
|
sam = True #if True, enter hostname
|
|
gunicorn_port = 5060
|
|
|
|
[irc]
|
|
hostname = irc.simp.i2p #if SAM enabled enter the irc address, else use localhost
|
|
username = test
|
|
password = password
|
|
port = 6667
|
|
channel = #test
|
|
primary = nobody1
|
|
auth_users = nobody1, nobody2, nobody3
|
|
tr = ! #the trigger used for commands like !help
|
|
|
|
## Bot commands
|
|
!help for list of commands, !help <command> for what it does
|
|
!admin help for list of admin commands
|
|
|
|
## NGINX config
|
|
|
|
server {
|
|
listen 5060;
|
|
server_name somedomain.i2p;
|
|
server_tokens off;
|
|
if ($request_method !~ ^(GET)$ ) {
|
|
return 444;
|
|
}
|
|
if ($http_user_agent ~* LWP::Simple|BBBike|wget) {
|
|
return 444;
|
|
}
|
|
location / {
|
|
proxy_hide_header Server;
|
|
proxy_pass http://unix:/path/to/guessthesong/ eepsite.sock;
|
|
}
|
|
} |