steam_hlds_log_parser 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -6
- data/lib/steam_hlds_log_parser/client.rb +6 -2
- data/lib/steam_hlds_log_parser/handler.rb +7 -3
- data/lib/steam_hlds_log_parser/version.rb +1 -1
- metadata +3 -4
- data/lib/.DS_Store +0 -0
- /data/{example → examples}/example-1.rb +0 -0
- /data/{example → examples}/example-2.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA512:
|
3
|
-
data.tar.gz:
|
4
|
-
metadata.gz:
|
3
|
+
data.tar.gz: 3bc2eb5cc13ade49b5467b27a58ffed3630ffe3121b2bb0bf52dac7b5eb06c1d556ff3bacd8884eb397d0c541d1c6052265f6a3c5cdceb18ce862e3aa5e8e360
|
4
|
+
metadata.gz: 191dd0220f6b60bc2970e2af9c420cbe0d56d4c533d4e8ad8595883cdd28c38fd91ee40ce8bdc531738a46730e0e9c2955cac08e0dc424b8615f204e9091786c
|
5
5
|
SHA1:
|
6
|
-
data.tar.gz:
|
7
|
-
metadata.gz:
|
6
|
+
data.tar.gz: 53510a0ac2927b3e16b2e4739ef057cc1f7d6aed
|
7
|
+
metadata.gz: 047028a751c2032a54fb6ffda1584cf231ef3128
|
data/README.md
CHANGED
@@ -1,11 +1,10 @@
|
|
1
1
|
# Steam Hlds Log Parser
|
2
2
|
|
3
|
-
|
4
|
-
The returned content can be sent to a website, IRC or flowdock for match live streaming.
|
3
|
+
Steam Hlds Log Parser listens to UDP log packets sent by your (local or remote) HLDS game server, processes data and returns clean or/and translated and readable content that you can use for your website, irc channel, match live streaming, bots, database...
|
5
4
|
|
6
|
-
|
5
|
+
Should work with all Steam HLDS based games, and has been mostly tested on Counter-Strike 1.6.
|
7
6
|
|
8
|
-
Note : content is sent in english or french at this time. Need i18n contributors!
|
7
|
+
Note : translated content is sent in english or french at this time. Need i18n contributors!
|
9
8
|
|
10
9
|
## Build Status
|
11
10
|
|
@@ -27,12 +26,14 @@ Or install it yourself as:
|
|
27
26
|
|
28
27
|
$ gem install steam_hlds_log_parser
|
29
28
|
|
30
|
-
##
|
29
|
+
## Configuration
|
31
30
|
|
32
31
|
1. Create your own displayer callback `class` which will receive parsed data
|
33
32
|
Ask this `class` to write a file, send content to IRC or flowdock... whatever... and give it as `:displayer` Hash option
|
34
33
|
2. Create a new client on desired IP / Port / Options
|
35
|
-
3. In your
|
34
|
+
3. Of course, you need to have server RCON. In your `server.cfg` (or in server console) add `logaddress 127.0.0.1 27035`. It specifies where the logs will be sent. This must be the IP / Port your ruby client will listen to.
|
35
|
+
|
36
|
+
If you are behind a router/firewall, you probably need to configure it.
|
36
37
|
|
37
38
|
## Example
|
38
39
|
|
@@ -59,6 +60,16 @@ Ask this `class` to write a file, send content to IRC or flowdock... whatever...
|
|
59
60
|
parser = SteamHldsLogParser::Client.new("127.0.0.1", 27035, options)
|
60
61
|
parser.start
|
61
62
|
|
63
|
+
## Documentation
|
64
|
+
|
65
|
+
Steam HLDS Log Parser should be 100% documented.
|
66
|
+
However, if you find something to improve, feel free to contribute.
|
67
|
+
Full documentation can be found on [Steam HLDS Parser Log page on Rubydoc](http://rubydoc.info/gems/steam_hlds_log_parser).
|
68
|
+
|
69
|
+
## Tests
|
70
|
+
|
71
|
+
Steam HLDS Log Parser uses RSpec as test / specification framework and should be 100% tested too.
|
72
|
+
Here again, feel free to improve it.
|
62
73
|
|
63
74
|
## Contributing
|
64
75
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
module SteamHldsLogParser
|
2
2
|
|
3
3
|
# Listens to HLDS logs received via UDP on configured port
|
4
|
+
#
|
5
|
+
# @attr_reader [String] host Client host / IP
|
6
|
+
# @attr_reader [Integer] port Client port to listen to
|
7
|
+
# @attr_reader [Hash] options Client options
|
4
8
|
class Client
|
5
9
|
|
6
10
|
attr_reader :host, :port, :options
|
@@ -8,8 +12,8 @@ module SteamHldsLogParser
|
|
8
12
|
# Creates a new client
|
9
13
|
#
|
10
14
|
# @param [String] host Hostname / IP Address the server will be running
|
11
|
-
# @param [Integer] port Port
|
12
|
-
# @param [Hash] options Other options
|
15
|
+
# @param [Integer] port Port will be listening to
|
16
|
+
# @param [Hash] options Other configuration options
|
13
17
|
#
|
14
18
|
# @option options [Symbol] :locale (:en) Set the language of returned content
|
15
19
|
# @option options [Boolean] :display_kills (true) Enable kills / frags detail
|
@@ -1,15 +1,19 @@
|
|
1
1
|
module SteamHldsLogParser
|
2
2
|
|
3
3
|
# Process data received by 'Client'
|
4
|
+
#
|
5
|
+
# @attr_reader [String] host Client host / IP
|
6
|
+
# @attr_reader [Integer] port Client port to listen to
|
7
|
+
# @attr_reader [Hash] options Client options
|
4
8
|
class Handler < EM::Connection
|
5
9
|
|
6
10
|
attr_reader :host, :port, :options
|
7
11
|
|
8
12
|
# Initialize Handler from Client options
|
9
13
|
#
|
10
|
-
# @param [String] host Hostname / IP Address the server
|
11
|
-
# @param [Integer] port Port
|
12
|
-
# @param [Hash] options Other options
|
14
|
+
# @param [String] host Hostname / IP Address the server is running
|
15
|
+
# @param [Integer] port Port is listening to
|
16
|
+
# @param [Hash] options Other client configuration options
|
13
17
|
#
|
14
18
|
def initialize(host, port, options)
|
15
19
|
@host, @port, @options = host, port, options
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: steam_hlds_log_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas VIAL
|
@@ -100,9 +100,8 @@ files:
|
|
100
100
|
- LICENSE.txt
|
101
101
|
- README.md
|
102
102
|
- Rakefile
|
103
|
-
-
|
104
|
-
-
|
105
|
-
- lib/.DS_Store
|
103
|
+
- examples/example-1.rb
|
104
|
+
- examples/example-2.rb
|
106
105
|
- lib/locales/en.yml
|
107
106
|
- lib/locales/fr.yml
|
108
107
|
- lib/steam_hlds_log_parser.rb
|
data/lib/.DS_Store
DELETED
Binary file
|
File without changes
|
File without changes
|