1# http://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

4# ---|P------/S----------~Lg---------- 

5 

6from __future__ import absolute_import, print_function 

7 

8from pyrocko import squirrel as sq 

9 

10 

11headline = 'Create local environment.' 

12 

13description = headline + ''' 

14 

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. 

20 

21The local enviroment consists of a directory ```.squirrel``` which contains 

22the Squirrel's database and a cache directory. 

23 

24A local environment can be removed by removing its ```.squirrel``` directory. 

25 

26The user's global enviroment database resides in Pyrocko’s global cache 

27directory, by default in ```$HOME/.pyrocko/cache/squirrel```. 

28''' 

29 

30 

31def make_subparser(subparsers): 

32 return subparsers.add_parser( 

33 'init', 

34 help=headline, 

35 description=description) 

36 

37 

38def setup(parser): 

39 pass 

40 

41 

42def run(parser, args): 

43 sq.init_environment()