炉石卡组代码解析 | Hearthstone deckstring parser written in PHP
本仓库不再维护,请转到hsdeck。
利用Python和PHP实现的炉石传说卡组解析应用。请使用Python3运行。
# Clone this repository
git clone https://github.com/stevenjoezhang/Hearthstone-Deck.git
# Go into the repository
cd Hearthstone-Deck
# Install dependencies
pip3 install -r requirements.txt
首先建立MySQL数据库,并修改deck.py
中的相关内容,使Python能够正确访问数据库。
从HearthstoneJSON上找到最新的cards.collectible.json
,替换掉本项目下的同名文件。
如果你直接点击这个网页上的链接,会跳转到一个类似于
https://api.hearthstonejson.com/v1/30103/enUS/cards.collectible.json
的网址。这里只有英文版本的卡牌描述。如果需要多语言版本,需要手动修改为:
https://api.hearthstonejson.com/v1/30103/all/cards.collectible.json
然后下载该文件并替换即可。
执行deck.py
,会自动将json文件中的有用信息导入数据库。
将public
目录移到Web服务器(需支持PHP)的目录下,通过浏览器访问index.php
即可查看效果。
本项目受到了mashirozx/Awesome-Deck的启发。
Released under the GNU General Public License v3
http://www.gnu.org/licenses/gpl-3.0.html