What have you found for these years?

2009-05-18

上傳了 XDD (2)

大概寫到這裡差不多了,加了一個 template_reader.rb
其實昨天就寫完了,只是沒力了,今天才補上 optparse 的介面。
用處就是讀入 guild wars template code, 輸出三種格式:

$ ruby template_reader.rb
Usage: ruby template_reader.rb [options] [files]
-h, --help Show this message
-i, --stdin Read from stdin
-t, --text Output text (default)
-s, --snippet Output xhtml snippet (for forum/blog post)
-p, --page Output xhtml page

我貼我的結果吧:
$ ruby1.9 template_reader.rb Skills/* -s | pbcopy
(pbcopy 是 mac 上把資料倒進剪貼簿的程式,很方便..
不過 utf-8 要用隱藏選項開,原本是不支援會變亂碼的)
(節錄好了,全部太長了。然後別問我 blank 是啥,
資料抓出來就這樣 @@ 我也好想知道為什麼喔...)
(啊還有一件事,那個 bit 的抽取方式亂寫的,
我不知道他這樣做的原因是什麼,搞不懂也只能硬幹...)

Skills/0H-A-D-Scy.txt:


Template: Skills
Version: 0
Code: OwpjMyp86QiXQXNXXgXXZi6XCAA
Profession: Assassin / Dervish

Attributes:
Critical Strikes 12
Scythe Mastery 12
Earth Prayers 3

Skills:
Vital Boon
Victorious Sweep
Eremite's Attack
Zealous Sweep
Aura of Thorns
Shield of Force
Signet of Pious Light
(blank)


Skills/0H-A-D.txt:


Template: Skills
Version: 0
Code: Owpj0xj86QiXPM9PIMHMZiXX6XA
Profession: Assassin / Dervish

Attributes:
Dagger Mastery 12
Critical Strikes 12
Earth Prayers 3

Skills:
Vital Boon
Unsuspecting Strike
Jungle Strike
Twisting Fangs
Death Blossom
Shield of Force
Aura of Thorns
(blank)


Skills/0H-D-Mo-Reaper.txt:


Template: Skills
Version: 0
Code: OgOj0MpMLPnbo74e8+dLv2N0IA
Profession: Dervish / Monk

Attributes:
Healing Prayers 3
Scythe Mastery 12
Mysticism 12

Skills:
Reaper's Sweep
Victorious Sweep
Zealous Renewal
Heart of Holy Flame
Mystic Vigor
Faithful Intervention
Restful Breeze
Death Nova

0 retries:

Post a Comment

Note: Only a member of this blog may post a comment.



All texts are licensed under CC Attribution 3.0