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 .. import common 

9 

10 

11def setup(subparsers): 

12 p = common.add_parser( 

13 subparsers, 'codes', 

14 help='Get summary of available data codes.') 

15 

16 common.add_selection_arguments(p) 

17 

18 return p 

19 

20 

21def call(parser, args): 

22 squirrel = common.squirrel_from_selection_arguments(args) 

23 for (kind, codes, deltat), count in squirrel.iter_counts(): 

24 print(kind, '.'.join(codes), deltat, count)