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