forked from kihashi/mtg-irc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpavement.py
More file actions
88 lines (67 loc) · 1.68 KB
/
pavement.py
File metadata and controls
88 lines (67 loc) · 1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from paver.easy import *
import paver.doctools
from paver.setuputils import setup
import os.path
@task
def init():
sh("python card_database/init_db.py")
@task
def clean():
if os.path.isfile('cards.sqlite'):
sh('rm cards.sqlite')
if os.path.isfile('AllSets-x.json'):
sh('rm AllSets-x.json')
if os.path.isfile('MRD-x.json'):
sh('rm MRD-x.json')
@task
def test():
sh('python card.py Thoughtcast')
sh('python card.py jace the mind sculptor')
sh('python card.py Aether Vial')
sh('python card.py This is not a card')
@task
def allsets():
sh('python mtgjson.py AllSets-x.json')
@task
def oneset():
sh('python mtgjson.py -s MRD-x.json')
@task
def download_data():
if not os.path.isfile('AllSets-x.json'):
sh('wget http://mtgjson.com/json/AllSets-x.json')
if not os.path.isfile('MRD-x.json'):
sh('wget http://mtgjson.com/json/MRD-x.json')
@task
def eprices():
sh('python expansions.py')
sh('python mtgotraders.py > mtgotraders.log')
@task
def nicknames():
sh('python nick.py')
@task
def fromcleanall():
clean()
download_data()
init()
allsets()
nicknames()
eprices()
test()
@task
def fromcleanone():
clean()
download_data()
init()
oneset()
nicknames()
test()
@task
def deploy():
sh('cp -r card_database ../willie/willie/modules/')
sh('cp mtg.py ../willie/willie/modules/')
sh('cp card.py ../willie/willie/modules/')
sh('cp price.py ../willie/willie/modules/')
sh('cp mtgotraders.py ../willie/willie/modules/')
sh('cp cards.sqlite ../willie/')
if os.path.isfile('config.py'):
sh('cp config.py ../willie/willie/modules/')