Cursow - Curses Server Browser
So somewhere in the 0.7 Beta thread someone suggested a curses
server browser. I thought this was an incredible idea, so here we
are.
Source@Github




Install:
1. git clone https://github.com/kalhartt/cursow.git
This will dowload the repo into a cursow directory for you
2. cd cursow
3. ./cursow.py
4. press <F2> to bring up the menu, <TAB> until the settings pane
5. Here use <UP>/<DOWN> to highlight your paths and <RETURN> to edit, press <RETURN> again when done
4. vim ~/.cursow
Edit path to warsow binary as necessary. The paths go to the binary (warsow.i686, warsow.x86_64), not to the folder.
Update (If you installed previously):
1. cd your_cursow_dir
2. git pull
3. rm ~/.cursow
I dont check for old/invalid config files so itll yell at you if you dont
4. ./cursow.py
Features:
Lists Servers! whoop whoop!
Shows players on server!
Filter by gametype/mod/empty/etc
Sort / reverse sort by column
Edit important settings in-app
Handles term resizes!
Fancy Sparkly Tickly Progress Bar!
TODO:
friends
(updated 2012-07-03 19:15:23)
Source@Github




Install:
1. git clone https://github.com/kalhartt/cursow.git
This will dowload the repo into a cursow directory for you
2. cd cursow
3. ./cursow.py
4. press <F2> to bring up the menu, <TAB> until the settings pane
5. Here use <UP>/<DOWN> to highlight your paths and <RETURN> to edit, press <RETURN> again when done
4. vim ~/.cursow
Edit path to warsow binary as necessary. The paths go to the binary (warsow.i686, warsow.x86_64), not to the folder.
Update (If you installed previously):
1. cd your_cursow_dir
2. git pull
3. rm ~/.cursow
I dont check for old/invalid config files so itll yell at you if you dont
4. ./cursow.py
Features:
Lists Servers! whoop whoop!
Shows players on server!
Filter by gametype/mod/empty/etc
Sort / reverse sort by column
Edit important settings in-app
Handles term resizes!
Fancy Sparkly Tickly Progress Bar!
TODO:
friends
(updated 2012-07-03 19:15:23)
Very nice, you should put up a github repo, so it's easier for
everyone else to contribute to the project.
clownfart wrote:
Very nice, you should put up a github repo, so it's easier for everyone else to contribute to the project.
It is a github repo :S
A_Pink_Name wrote:
BUGS:
only returns non-empty servers? not sure why this is, im sending to dpmaster
\xff\xff\xff\xffgetservers Warsow 12 full empty\n
and if I remove empty nothing changes.
You might look onto source to my Pig Browser (which seems to be porked atm..), I put it to git despite that I originally didn't intend to release the source at all.
Pig Browser @ Github
(updated 2012-06-08 17:23:12)
A_Pink_Name wrote:
clownfart wrote:
Very nice, you should put up a github repo, so it's easier for everyone else to contribute to the project.
It is a github repo :S
I suck at clicking links.
btw wrong link toukka
(updated 2012-06-08 09:23:50)
Omg toukka, soooo clean. I'll take a look and probably switch to
this for servers requests assuming you don't mind.
A_Pink_Name wrote:
Omg toukka, soooo clean. I'll take a look and probably switch to this for servers requests assuming you don't mind.
Just to add some PR, toukka is also behind 0.7 stat code ;)
A_Pink_Name wrote:
Omg toukka, soooo clean. I'll take a look and probably switch to this for servers requests assuming you don't mind.
It's open source, so ofc i don't mind :)
Update, it now mostly works with lots of bugs. Screenshot above is
updated.
# Navigate servers with up/down w/s or u/e. Launch server with z
to launch properly, you need to set wsw path, currently hard coded in cui/widgets.py
Program exits on launch with wsw still running so you can 'urxvt -e cursow.py' for example.
# using default 8-color mode for two reasons
1. with custom colors, terminal is screwed on program exit
2. matches your .XDefaults/.XResources if you're a fancy person
wsw matching colors are still available.
Edit: Sort with 'x', it rotates columns to sort by. Reverse sort order with 'X'
(updated 2012-06-12 17:20:06)
# Navigate servers with up/down w/s or u/e. Launch server with z
to launch properly, you need to set wsw path, currently hard coded in cui/widgets.py
Program exits on launch with wsw still running so you can 'urxvt -e cursow.py' for example.
# using default 8-color mode for two reasons
1. with custom colors, terminal is screwed on program exit
2. matches your .XDefaults/.XResources if you're a fancy person
wsw matching colors are still available.
Edit: Sort with 'x', it rotates columns to sort by. Reverse sort order with 'X'
(updated 2012-06-12 17:20:06)
Update again, this time it works great!
New keybinds, ill update op but here too
W/U = 5up
w/u/up = 1up
S/E/ = 5down
s/e/down = 1down
a/n/left = sort prev column
d/i/right = sort next column
page up = well... page up
page down = page down
TAB = switch wsw versions! 0.6<->0.7
ENTER = launch server
New Config File in ~/.cursow, heres an example
The config file is automatically generated if it doesn't exist. I recommend letting it be created, then changing the wsw path as needed.
(updated 2012-06-15 08:30:15)
New keybinds, ill update op but here too
W/U = 5up
w/u/up = 1up
S/E/ = 5down
s/e/down = 1down
a/n/left = sort prev column
d/i/right = sort next column
page up = well... page up
page down = page down
TAB = switch wsw versions! 0.6<->0.7
ENTER = launch server
New Config File in ~/.cursow, heres an example
[General]
wsw_0.6 = False
pingservers = true
wsw0.6_path = /opt/warsow/warsow
wsw0.6_args = +set fs_usehomedir 0 +set fs_basepath /my/wsw/settings
wsw0.7_path = ~/games/warsow0.7/warsow0.7b2/warsow
wsw0.7_args =
[Warsow 0.6]
master1 = dpmaster.deathmask.net
master3 = excalibur.nvg.ntnu.no
master2 = ghdigital.com
protocol = 12
master4 = eu.master.warsow.net
options = full empty
port = 27950
[Warsow 0.7]
master1 = dpmaster.deathmask.net
master3 = excalibur.nvg.ntnu.no
master2 = ghdigital.com
protocol = 6094
master4 = eu.master.warsow.net
options = full empty
port = 27950
The config file is automatically generated if it doesn't exist. I recommend letting it be created, then changing the wsw path as needed.
(updated 2012-06-15 08:30:15)
Really promising. I'm stunned by the speed you've been doing this.
I'd had given myself 2 month for what you have already done.
Add filters and favs, and this is my new game browser :3
Edit : I approve step 4.
(updated 2012-06-15 21:10:46)
Add filters and favs, and this is my new game browser :3
Edit : I approve step 4.
(updated 2012-06-15 21:10:46)
Great curses application! I haven't seen this kind of cui
application for a while :D
It works even on cygwin + teraterm on Windows7.
I'd request to add a progress bar or percentage during refreshing server status =)
It works even on cygwin + teraterm on Windows7.
I'd request to add a progress bar or percentage during refreshing server status =)
Filters, favorites, and friends are implemented-ish, they work but
there's no interface to them. That should be done by tomorrow.
Progress bar is a good idea! Shouldn't be hard to do.
I'm kinda impressed it works on cygwin. I'm interested to know if it still launches wsw when told (I'm switching from Popen which probably works in cygwin to os.execl which could be alot more troublesome for cygwin) and how pathing works through cygwin. I'll have to play with this :D
EDIT: And sjn people aren't allowed to do things slowly, except nexus...
(updated 2012-06-18 23:09:02)
Progress bar is a good idea! Shouldn't be hard to do.
I'm kinda impressed it works on cygwin. I'm interested to know if it still launches wsw when told (I'm switching from Popen which probably works in cygwin to os.execl which could be alot more troublesome for cygwin) and how pathing works through cygwin. I'll have to play with this :D
EDIT: And sjn people aren't allowed to do things slowly, except nexus...
(updated 2012-06-18 23:09:02)
I just edit like below by using warsow protocol (warsow://IP:PORT),
it works in my PC
"cygstart" is a launcher command for program/file/url. Same as "open" command in Mac OS X.
Just type like this
% cygstart warsow://IP:PORT
It works same as clicking <a href="warsow://IP:PORT">warsow://IP:PORT</a> in web browser.
diff --git a/cursow.py b/cursow.py
index 1adbf96..fad9581 100755
--- a/cursow.py
+++ b/cursow.py
@@ -127,7 +127,7 @@ class cursow(object):
def launch(self):
server = self.srvlst.items[self.srvlst.firstrow+self.srvlst.pos]
path, args = self.settings.getPath()
- runlist = [ path , args , 'connect', '%s:%d' % (server.host, server.port) ]
+ runlist = [ 'cygstart' , 'warsow://%s:%d' % (server.host, server.port) ]
#subprocess.Popen( runlist, stdout=file(os.devnull, 'w') )
subprocess.Popen( runlist )
"cygstart" is a launcher command for program/file/url. Same as "open" command in Mac OS X.
Just type like this
% cygstart warsow://IP:PORT
It works same as clicking <a href="warsow://IP:PORT">warsow://IP:PORT</a> in web browser.
Thanks for pointing out cygstart, I think its fixed on cygwin now.
I prefer not to depend on having warsow links registered, so set
your path (cygwin path ex: /cygdrive/.../warsow_x64.exe) in the
config file and try it again.
Also when I run it in cygwin, I'm getting alot of errors from ping which ruin the display. For now you can turn off pinging with [Display] ping servers = false, in the config file.
Also when I run it in cygwin, I'm getting alot of errors from ping which ruin the display. For now you can turn off pinging with [Display] ping servers = false, in the config file.
Filters are working!
F2 to toggle filter window, it uses same keybinds as main app.
Note, keybinds have moved to cui/__init__.py, feel free to modify to your liking.
Add favorites with 'f', remove them with 'F'. For now changes will not appear until a new query (close reopen program or tab twice).


Edit: Images added
(updated 2012-06-20 02:05:01)
F2 to toggle filter window, it uses same keybinds as main app.
Note, keybinds have moved to cui/__init__.py, feel free to modify to your liking.
Add favorites with 'f', remove them with 'F'. For now changes will not appear until a new query (close reopen program or tab twice).


Edit: Images added
(updated 2012-06-20 02:05:01)
Big Update! - see top post for updated screenshots
UI completely redone, built to handle term resizes
You can expand servers with <SPACE> to show who is playing on them!
Press <F1> for a help menu!
Progress bar implemented
More filter / sort options (reverse sort with r)
Now launches properly when run with $TERM -e ./cursow.py and correctly passes wsw args
UI completely redone, built to handle term resizes
You can expand servers with <SPACE> to show who is playing on them!
Press <F1> for a help menu!
Progress bar implemented
More filter / sort options (reverse sort with r)
Now launches properly when run with $TERM -e ./cursow.py and correctly passes wsw args
A_Pink_Name wrote:
You can expand servers with <SPACE> to show who is playing on them!
And now for some killer feature ! I'm advertising this browser in the french community forum already
Tested : have an import error, works only when commenting out
from .settings import settings ,in cui/__init__.py
(updated 2012-07-03 21:43:06)
BBQsauce wrote:
Tested : have an import error, works only when commenting out
from .settings import settings ,in cui/__init__.py
Good catch, forgot to remove that. Fixed now.
Now why didn't it throw that error for me :(

