git @ Cat's Eye Technologies ellsync / f5a18a2
Add --stream-name-only option to `list` command. Chris Pressey 4 years ago
2 changed file(s) with 9 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
194194
195195 Added `rename` command.
196196
197 Added `--stream-name-only` option to `list` command.
198
197199 ### 0.1
198200
199201 Initial release.
4646 def list_(router, options):
4747 for stream_name, stream in router.items():
4848 if os.path.isdir(stream['from']) and os.path.isdir(stream['to']):
49 print("{}: {} => {}".format(stream_name, stream['from'], stream['to']))
49 if options.stream_name_only:
50 print(stream_name)
51 else:
52 print("{}: {} => {}".format(stream_name, stream['from'], stream['to']))
5053
5154
5255 def sync(router, options):
145148
146149 # - - - - list - - - -
147150 parser_list = subparsers.add_parser('list', help='List available sync streams')
151 parser_list.add_argument('--stream-name-only', default=False, action='store_true',
152 help='Output only the names of the available streams'
153 )
148154 parser_list.set_defaults(func=list_)
149155
150156 # - - - - sync - - - -