vdf4r 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +13 -2
- data/lib/vdf.tt +1 -1
- data/lib/vdf4r/version.rb +1 -1
- data/spec/fixtures/bad/multi_line_enter.txt +5 -0
- data/spec/fixtures/bad/multi_line_exit.txt +4 -0
- data/spec/fixtures/dota_english.txt +24 -0
- metadata +28 -37
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7a09a7af158491d41e544601f8a672a2fdb23ae1
|
4
|
+
data.tar.gz: 88053df30f73d3e41e7ec671793d7e22ca709848
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: eed8929b97c8279ce42811f5d78e102a402f2a9e574aaf4a20045de6400a3de43b8feb9cdd7e4c7705275854fded4c8b6da50d26ddd24760e2c81c43dbb35f0b
|
7
|
+
data.tar.gz: d76015eeebcfbd8fb52fae8984397df910a28801eccb124fd1ee523ac9de609e450105d5206d1e1658c1536aa32de8d64074ae38572e1408ba6dbe8276bc0f9d
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ As normal:
|
|
19
19
|
|
20
20
|
Or in your Gemfile:
|
21
21
|
|
22
|
-
gem 'vdf4r'
|
22
|
+
gem 'vdf4r'
|
23
23
|
|
24
24
|
|
25
25
|
## Usage
|
@@ -51,7 +51,18 @@ parsing, you will need to fix the error. It will give you the offending line:
|
|
51
51
|
Indeed, in the VDF file, there are "comment" lines lacking the proper '//'
|
52
52
|
prefix. When I changed the file to contain '// Damage.' it parsed correctly.
|
53
53
|
|
54
|
-
|
54
|
+
Another thing you'll see, specifically in `dota_english.txt` is the placement
|
55
|
+
of two key/value pairs on one line. This will have to be fixed manually, since
|
56
|
+
it's an outright error:
|
57
|
+
|
58
|
+
"DOTA_Tooltip_ability_item_mjollnir_static_duration" "STATIC DURATION:" "DOTA_Tooltip_ability_item_mjollnir_static_damage" "STATIC DAMAGE:"
|
59
|
+
|
60
|
+
This can be fixed like so if you encounter similar errors:
|
61
|
+
|
62
|
+
"DOTA_Tooltip_ability_item_mjollnir_static_duration" "STATIC DURATION:"
|
63
|
+
"DOTA_Tooltip_ability_item_mjollnir_static_damage" "STATIC DAMAGE:"
|
64
|
+
|
65
|
+
I'll try to make the parser more permissive as time allows.
|
55
66
|
|
56
67
|
|
57
68
|
## Hacking
|
data/lib/vdf.tt
CHANGED
data/lib/vdf4r/version.rb
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
"lang"
|
2
|
+
{
|
3
|
+
"Language" "English"
|
4
|
+
"Tokens"
|
5
|
+
{
|
6
|
+
"DOTA_ItemOnSale" "SALE!"
|
7
|
+
|
8
|
+
"DOTA_AttackMove" "Attack Move"
|
9
|
+
"DOTA_RespawnTime" "Respawning in %s1 seconds"
|
10
|
+
//top bar
|
11
|
+
|
12
|
+
"DOTA_Chat_QuintupleKill" "%s1 IS ON A RAMPAGE!!"
|
13
|
+
// The Archronicus - Title Page
|
14
|
+
|
15
|
+
"DOTA_Archronicus_MadMoon_Page4" "The fallen shards of primal matter had fractured into their original composites: Radiant and Dire. In its pure form, each type of stone gave off a peculiar energy. For those who settled around the sites, they found themselves feeding on this unearthly power until they had not only harnessed the energy but made themselves dependent on it. They built shrines around the Ancients and revered them, ironically, as godlike entities that had fallen to earth.
|
16
|
+
The Ancients, both Radiant and Dire, provided many benefits: kinetic energy, mana, protection, even resurrection. But the emanations changed everything in their influence. Around the Radiant, the effects were bright and colorful, evoking lightness and charm. Around the Dire, a sinister radioactive glow, a visual seepage indicative of poison and decay. Neither force was neutral; they were both perfect complements and total contradictions that could never be at peace.
|
17
|
+
As each stone's cultural influence spread, it eventually came in conflict with the societies of its rival. Interference between the Ancients was cause for war, as the presence of one caused a corresponding fall-off in the energy of the other. Each stone could only be restored to full power with the destruction of its Foe-stone. And so the enthralled creatures rallied to protect their land by destroying the neighboring Ancient, and from far and wide the Heroes heard the call to battle and came to join, hardly realizing that in some sense both sides were the same."
|
18
|
+
|
19
|
+
"npc_dota_hero_rattletrap_bio" "Rattletrap descends from the same far-flung kindred as Sniper and Tinker, and like many of the Keen Folk, has offset his diminutive stature through the application of gadgetry and wit. The son of the son of a clockmaker, Rattletrap was many years apprenticed to that trade before war rode down from the mountains and swept the plains villages free of such innocent vocations. “Your new trade is battle,” his dying father told him as the village of their ancestors lay in charred and smoking ruins.
|
20
|
+
It is a poor tradesman who blames his tools, and Rattletrap was never one to make excuses. After burying his father among the ruins of their village, he set about to transform himself into the greatest tool of warfare that any world had ever seen. He vowed to never again be caught unprepared, instead using his talents to assemble a suit of powered Clockwerk armor to make the knights of other lands look like tin cans by comparison. Now Rattletrap is alive with devices, a small but deadly warrior whose skills at ambush and destruction have risen to near-automated levels of efficiency. An artisan of death, his mechanizations make short work of the unwary, heralding a new dawn in this age of warfare. What time is it? It's Clockwerk time!
|
21
|
+
"
|
22
|
+
|
23
|
+
}
|
24
|
+
}
|
metadata
CHANGED
@@ -1,48 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vdf4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Joshua Morris
|
9
|
-
autorequire:
|
8
|
+
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
11
|
date: 2014-04-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: treetop
|
16
|
-
|
17
|
-
none: false
|
15
|
+
version_requirements: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 1.5.0
|
22
|
-
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
20
|
+
requirement: !ruby/object:Gem::Requirement
|
26
21
|
requirements:
|
27
|
-
- -
|
22
|
+
- - '>='
|
28
23
|
- !ruby/object:Gem::Version
|
29
24
|
version: 1.5.0
|
25
|
+
prerelease: false
|
26
|
+
type: :runtime
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: rspec
|
32
|
-
|
33
|
-
none: false
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 2.14.1
|
38
|
-
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
34
|
+
requirement: !ruby/object:Gem::Requirement
|
42
35
|
requirements:
|
43
|
-
- -
|
36
|
+
- - '>='
|
44
37
|
- !ruby/object:Gem::Version
|
45
38
|
version: 2.14.1
|
39
|
+
prerelease: false
|
40
|
+
type: :development
|
46
41
|
description: See README at https://github.com/skadistats/vdf4r
|
47
42
|
email: onethirtyfive@skadistats.com
|
48
43
|
executables: []
|
@@ -50,17 +45,20 @@ extensions: []
|
|
50
45
|
extra_rdoc_files: []
|
51
46
|
files:
|
52
47
|
- lib/vdf.tt
|
48
|
+
- lib/vdf4r.rb
|
53
49
|
- lib/vdf4r/parser.rb
|
54
50
|
- lib/vdf4r/store.rb
|
55
51
|
- lib/vdf4r/version.rb
|
56
|
-
-
|
52
|
+
- spec/spec_helper.rb
|
53
|
+
- spec/fixtures/dota_english.txt
|
54
|
+
- spec/fixtures/items.txt
|
57
55
|
- spec/fixtures/bad/excessive_exit.txt
|
58
56
|
- spec/fixtures/bad/insufficient_exit.txt
|
57
|
+
- spec/fixtures/bad/multi_line_enter.txt
|
58
|
+
- spec/fixtures/bad/multi_line_exit.txt
|
59
59
|
- spec/fixtures/bad/no_preceding_key.txt
|
60
60
|
- spec/fixtures/bad/too_recursive.txt
|
61
61
|
- spec/fixtures/bad/ungrammatical_content.txt
|
62
|
-
- spec/fixtures/items.txt
|
63
|
-
- spec/spec_helper.rb
|
64
62
|
- spec/vdf4r/parser_spec.rb
|
65
63
|
- spec/vdf4r/store_spec.rb
|
66
64
|
- README.md
|
@@ -68,32 +66,25 @@ files:
|
|
68
66
|
homepage: https://github.com/skadistats/vdf4r
|
69
67
|
licenses:
|
70
68
|
- MIT
|
71
|
-
|
69
|
+
metadata: {}
|
70
|
+
post_install_message:
|
72
71
|
rdoc_options: []
|
73
72
|
require_paths:
|
74
73
|
- lib
|
75
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
-
none: false
|
77
75
|
requirements:
|
78
|
-
- -
|
76
|
+
- - '>='
|
79
77
|
- !ruby/object:Gem::Version
|
80
78
|
version: '0'
|
81
|
-
segments:
|
82
|
-
- 0
|
83
|
-
hash: 1856681965695248353
|
84
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
-
none: false
|
86
80
|
requirements:
|
87
|
-
- -
|
81
|
+
- - '>='
|
88
82
|
- !ruby/object:Gem::Version
|
89
83
|
version: '0'
|
90
|
-
segments:
|
91
|
-
- 0
|
92
|
-
hash: 1856681965695248353
|
93
84
|
requirements: []
|
94
|
-
rubyforge_project:
|
95
|
-
rubygems_version: 1.
|
96
|
-
signing_key:
|
97
|
-
specification_version:
|
85
|
+
rubyforge_project:
|
86
|
+
rubygems_version: 2.1.9
|
87
|
+
signing_key:
|
88
|
+
specification_version: 4
|
98
89
|
summary: Valve Data Format (VDF) file parser
|
99
90
|
test_files: []
|