project-stats

keep track of your projects
git clone https://git.ce9e.org/project-stats.git

commit
1bdf284ac97356d9571c9494a90638f288503963
parent
7534e4ca05780f77d7294131bf59f06f509d24eb
Author
Tobias Bengfort <tobias.bengfort@gmx.net>
Date
2015-03-22 16:15
allow sorting in cli

Diffstat

M projects.py 6 ++++++

1 files changed, 6 insertions, 0 deletions


diff --git a/projects.py b/projects.py

@@ -339,6 +339,9 @@ def parse_args():
  339   339         '-c', '--config',
  340   340         default='projects.yml')
  341   341     parser.add_argument(
   -1   342         '-z', '--sort',
   -1   343         help='sort by key')
   -1   344     parser.add_argument(
  342   345         '-S', '--show-sources',
  343   346         action='store_true',
  344   347         help='show a source for each claim')
@@ -379,6 +382,9 @@ def main():
  379   382 
  380   383     projects = get_projects({key: config['projects'][key] for key in keys})
  381   384 
   -1   385     if args.sort is not None:
   -1   386         keys.sort(key=lambda k: projects[k][args.sort])
   -1   387 
  382   388     if args.list:
  383   389         for key in keys:
  384   390             print key