smogon / pokemon-showdown

Pokémon battle simulator.
https://pokemonshowdown.com
MIT License
4.8k stars 2.8k forks source link

Support /modlog within a windows environment #267

Closed Zazie-Lavender closed 9 years ago

Zazie-Lavender commented 11 years ago

Several projects exist in the Win32 environment that allow for use of commands like tail, awk and sort.

http://sourceforge.net/projects/tailforwin32/ http://gnuwin32.sourceforge.net/packages/coreutils.htm http://gnuwin32.sourceforge.net/packages/gawk.htm

Not to mention projects like CygWin which completely emulate a Linux/Unix environment.

http://www.cygwin.com/

I'm reasonably certain that it would be possible to bring /modlog functionality to those running windows based servers.

Zarel commented 11 years ago

Sounds good! Will you be providing code for it? If you submit a pull request, I'll certainly accept it!

NightKev commented 11 years ago

It seems like the command shouldn't rely on such external programs anyway... too bad it's not in Python or I'd quickly submit a PR to fix it :P. Oh well, maybe I can still hack something together.

Joimer commented 11 years ago

For my window implementation I just used node's fr to read and loop through the file to find the desired data: https://github.com/Joimer/scripts/blob/master/winmodlog.js

Zarel commented 10 years ago

@Joimer is there any reason you haven't committed your Windows implementation? It's probably better than an error message.

Marty-D commented 9 years ago

Done in https://github.com/Zarel/Pokemon-Showdown/pull/1350.