(CommandList children: [ (FuncDef name: usage body: (BraceGroup children: [ (SimpleCommand words: [{(cat)}] redirects: [ (HereDoc op: <Redir_DLess '<<'> fd: 16777215 here_begin: {(EOF)} here_end_span_id: 74 stdin_parts: [ ('Usage: ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [23 27] ) (' -b border -c color imagename\n') (' or ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [30 34] ) (' -f frame -m color imagename\n') ('\n') ( 'In the first case, specify border parameters as size x size or percentage x percentage\n' ) ('followed by the color desired for the border (RGB or color name).\n') ('\n') ( 'In the second instance, specify the frame size and offset, followed by the\n' ) ('matte color.\n') ('\n') ('EXAMPLE USAGE:\n') (' ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [45 49] ) (' -b 15x15 -c black imagename\n') (' ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [52 56] ) (' -b 10%x10% -c grey imagename\n') ('\n') (' ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [60 64] ) (' -f 10x10+10+0 imagename\n') (' ') (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [67 71] ) (' -f 6x6+2+2 -m tomato imagename\n') ] ) ] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [14] ) spids: [10 13] ) (WhileUntil keyword: <KW_While while> cond: [(Sentence child:(C {(getopts)} {(DQ ('b:c:f:m:'))} {(opt)}) terminator:<Op_Semi ';'>)] body: (DoGroup children: [ (Case to_match: {($ VSub_Name '$opt')} arms: [ (case_arm pat_list: [{(b)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:border) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [115] ) ] spids: [115] ) terminator: <Op_Semi ';'> ) ] spids: [111 113 121 16777215] ) (case_arm pat_list: [{(c)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:bordercolor) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [128] ) ] spids: [128] ) terminator: <Op_Semi ';'> ) ] spids: [124 126 134 16777215] ) (case_arm pat_list: [{(f)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:frame) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [141] ) ] spids: [141] ) terminator: <Op_Semi ';'> ) ] spids: [137 139 147 16777215] ) (case_arm pat_list: [{(m)}] action: [ (Sentence child: (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:mattecolor) op: Equal rhs: {(DQ ($ VSub_Name '$OPTARG'))} spids: [154] ) ] spids: [154] ) terminator: <Op_Semi ';'> ) ] spids: [150 152 160 16777215] ) (case_arm pat_list: [{(Lit_Other '?')}] action: [(Sentence child:(C {(usage)}) terminator:<Op_Semi ';'>)] spids: [163 165 170 16777215] ) ] spids: [104 108 173] ) ] spids: [101 175] ) ) (C {(shift)} { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithWord w:{($ VSub_Name '$OPTIND')}) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [179 186] ) } ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-eq)} {(0)} {(Lit_Other ']')}) terminator: <Op_Semi ';'> ) ] action: [(C {(usage)})] spids: [16777215 206] ) ] spids: [16777215 214] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$bordercolor'))} {(-a)} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$mattecolor'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [253 257] ) (": You can't specify a color and matte color simultaneously.") ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 247] ) ] spids: [16777215 269] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$frame'))} {(-a)} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$border'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [ {(echo)} { (DQ (CommandSubPart command_list: (CommandList children:[(C {(basename)} {($ VSub_Number '$0')})]) left_token: <Left_CommandSub '$('> spids: [304 308] ) (": You can't specify a border and frame simultaneously.") ) } ] redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)}) ] spids: [16777215 298] ) ] spids: [16777215 320] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-z)} {(DQ ($ VSub_Name '$border'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:args) op: Equal rhs: { (DQ ('-bordercolor ') ($ VSub_Name '$bordercolor') (' -border ') ($ VSub_Name '$border') ) } spids: [342] ) ] spids: [342] ) ] spids: [16777215 339] ) ] else_action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:args) op: Equal rhs: { (DQ ('-mattecolor ') ($ VSub_Name '$mattecolor') (' -frame ') ($ VSub_Name '$frame')) } spids: [353] ) ] spids: [353] ) ] spids: [350 361] ) (ForEach iter_name: name do_arg_iter: T body: (DoGroup children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:suffix) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$name')}) (C {(rev)}) (C {(cut)} {(-d.)} {(-f1)}) (C {(rev)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [374 394] ) ) } spids: [372] ) ] spids: [372] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:prefix) op: Equal rhs: { (DQ (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {($ VSub_Name '$name')}) (C {(rev)}) (C {(cut)} {(-d.)} {(-f2-)}) (C {(rev)}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [400 420] ) ) } spids: [398] ) ] spids: [398] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:newname) op: Equal rhs: {(DQ ($ VSub_Name '$prefix') ('+f.') ($ VSub_Name '$suffix'))} spids: [424] ) ] spids: [424] ) (C {(echo)} { (DQ ('Adding a frame to image ') ($ VSub_Name '$name') (', saving as ') ($ VSub_Name '$newname') ) } ) (C {(convert)} {($ VSub_Name '$name')} {($ VSub_Name '$args')} {($ VSub_Name '$newname')}) ] spids: [369 450] ) spids: [16777215 16777215] ) (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(0)}) ] )