From f5c2958b903d1bff55424e496c1e51e3a0f7f7df Mon Sep 17 00:00:00 2001 From: blacktwin Date: Mon, 13 Jul 2020 19:45:50 -0400 Subject: [PATCH] adding export action and arg --- fun/playlist_manager.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fun/playlist_manager.py b/fun/playlist_manager.py index dab58a9..e84f002 100644 --- a/fun/playlist_manager.py +++ b/fun/playlist_manager.py @@ -183,8 +183,9 @@ def actions(): update - remove playlist type and create new playlist type for admin or users show - show contents of playlist type or admin or users current playlists share - share existing playlist by title from admin to users + export - export playlist by title from admin to users """ - return ['add', 'remove', 'update', 'show', 'share'] + return ['add', 'remove', 'update', 'show', 'share', 'export'] def selectors(): @@ -750,6 +751,9 @@ if __name__ == "__main__": parser.add_argument('--search', action='append', type=lambda kv: kv.split("="), help='Search non-filtered metadata fields for keywords ' 'in title, summary, etc.') + parser.add_argument('--export', choices=['csv', 'json'], default='json', + help='Space separated list of case sensitive names to process. Allowed names are:\n' + 'Choices: %(choices)s\nDefault: %(default)s)') opts = parser.parse_args()