@@ -759,21 +759,27 @@ def migrate(argv):
759759 # should we also change the default values stored in the Project?
760760
761761
762- def script (argv ):
763- """Print script content of the recording label ."""
764- usage = "%(prog)s script "
765- description = "Print script content of the recording label ."
762+ def view (argv ):
763+ """View detail of a single record ."""
764+ usage = "%(prog)s view "
765+ description = "View detail of a single record ."
766766 parser = ArgumentParser (usage = usage ,
767767 description = description )
768768 parser .add_argument ('label' )
769+ parser .add_argument ('-s' , '--script' , help = "show script content." )
770+ parser .add_argument ('-v' , '--version' , help = "show version of main script." )
769771 args = parser .parse_args (argv )
770772 project = load_project ()
771773 record = project .get_record (args .label )
772774 print ('Main_File\t :' ,record .main_file )
773- print ('Version\t \t :' ,record .version )
774- print (80 * '-' )
775- print (record .script_content )
776- print (80 * '-' )
775+ if args .version :
776+ print ('Version\t \t :' ,record .version )
777+ print (80 * '-' )
778+ if args .script :
779+ print (record .script_content )
780+ print (80 * '-' )
781+ # implementation to finish, including other record fields as options
782+ # todo: use `formatting` module, rather than print statements
777783
778784
779785def version (argv ):
0 commit comments