1# http://pyrocko.org - GPLv3
2#
3# The Pyrocko Developers, 21st Century
4# ---|P------/S----------~Lg----------
6from __future__ import absolute_import, print_function
8from pyrocko import squirrel as sq
11headline = 'Create local environment.'
13description = headline + '''
15Squirrel based applications can either use the user’s global Squirrel
16environment or a project specific local environment. Running this command in a
17project's top level directory creates a local environment. Any Squirrel
18application started thereafter in this directory or any of its subdirectories,
19will use the local enviroment instead of the global one.
21The local enviroment consists of a directory ```.squirrel``` which contains
22the Squirrel's database and a cache directory.
24A local environment can be removed by removing its ```.squirrel``` directory.
26The user's global enviroment database resides in Pyrocko’s global cache
27directory, by default in ```$HOME/.pyrocko/cache/squirrel```.
28'''
31def make_subparser(subparsers):
32 return subparsers.add_parser(
33 'init',
34 help=headline,
35 description=description)
38def setup(parser):
39 pass
42def run(parser, args):
43 sq.init_environment()