1# http://pyrocko.org - GPLv3 

2# 

3# The Pyrocko Developers, 21st Century 

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

5 

6from pyrocko import squirrel as sq 

7 

8 

9headline = 'Create local environment.' 

10 

11description = headline + ''' 

12 

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. 

18 

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

20the Squirrel's database and a cache directory. 

21 

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

23 

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

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

26''' 

27 

28 

29def make_subparser(subparsers): 

30 return subparsers.add_parser( 

31 'init', 

32 help=headline, 

33 description=description) 

34 

35 

36def setup(parser): 

37 pass 

38 

39 

40def run(parser, args): 

41 sq.init_environment()