-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtasks.py
55 lines (40 loc) · 1.19 KB
/
tasks.py
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
from invoke import task
from invoke import run
import os
PROJECT_DIR = os.path.join(os.path.dirname(__file__), 'src/beetracker')
def local(command):
run("cd {0} && {1}".format(PROJECT_DIR, command), echo=True, pty=True)
@task
def server():
"""run the dev server"""
local('python manage.py runserver 0:8000')
@task
def celery():
"""start the celery server"""
local('python manage.py celeryd -E -B --concurrency=1')
@task
def translations():
"""make and compile translations
.. note:: restricted usage
"""
make_translations()
compile_translations()
@task
def make_translations():
"""make translations
.. note:: restricted usage
"""
local('python manage.py makemessages --all --no-wrap --no-location')
@task
def compile_translations():
"""compile translations
.. note:: restricted usage
"""
local('python manage.py compilemessages')
@task
def docs_presentation():
run("hovercraft docs/presentation/overview.rst docs/_build/pres_over/", echo=True, pty=True)
run("hovercraft docs/presentation/ia.rst docs/_build/pres_ia/", echo=True, pty=True)
@task
def docs():
run("cd docs && make html", echo=True, pty=True)