(CommandList children: [ (BraceGroup children: [ (Sentence child: (C {(renice)} {(-n)} {(-10)} {($ VSub_Dollar '$$')}) terminator: <Op_Amp '&'> ) (SimpleCommand redirects: [(Redir op_id:Redir_Great fd:16777215 arg_word:{(/dev/null)} spids:[92])] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:INPUT) op:Equal rhs:{(0)} spids:[98])] spids: [98] ) (If arms: [ (if_arm cond: [ (Sentence child: (DBracket expr: (BoolBinary op_id: BoolBinary_EqualTilde left: {($ VSub_Number '$1')} right: {(Lit_Other '^') (-) (Lit_Other '?') (Lit_Other '[') (0-9) (Lit_Other ']') (Lit_Other '+') (Lit_Other '$') } ) ) terminator: <Op_Semi ';'> ) ] action: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:INPUT) op: Equal rhs: {($ VSub_Number '$1')} spids: [125] ) ] spids: [125] ) ] spids: [16777215 122] ) ] spids: [16777215 129] ) (C {(.)} {(/DietPi/dietpi/func/dietpi-globals)}) (C {(G_CHECK_ROOT_USER)}) (C {(export)} {(Lit_VarLike 'G_PROGRAM_NAME=') (SQ <DietPi-Morsecode>)}) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:OUTPUT_MODE) op: Equal rhs: {($ VSub_Name '$INPUT')} spids: [170] ) ] spids: [170] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TERM_X) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(tput)} {(cols)})]) left_token: <Left_CommandSub '$('> spids: [180 184] ) } spids: [179] ) ] spids: [179] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TERM_Y) op: Equal rhs: { (CommandSubPart command_list: (CommandList children:[(C {(tput)} {(lines)})]) left_token: <Left_CommandSub '$('> spids: [188 192] ) } spids: [187] ) ] spids: [187] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TERM_TOTAL_CHARS) op: Equal rhs: { (ArithSubPart anode: (ArithBinary op_id: Arith_Minus left: (ArithBinary op_id: Arith_Star left: (ArithWord w:{($ VSub_Name '$TERM_X')}) right: (ArithWord w:{($ VSub_Name '$TERM_Y')}) ) right: (ArithWord w:{(Lit_Digits 1)}) ) spids: [196 208] ) } spids: [195] ) ] spids: [195] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:TERM_COLOUR) op: Equal rhs: {(DQ (Lit_Other '\\') ('e[48;5;15m'))} spids: [214] ) ] spids: [214] ) (FuncDef name: Output_On body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(-e)} {(DQ ($ VSub_Name '$TERM_COLOUR'))}) (C {(clear)})] spids: [16777215 257] ) (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 1)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/sys/class/leds/led0/brightness)} spids: [304] ) ] ) (SimpleCommand words: [{(echo)} {(1)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/sys/class/leds/led1/brightness)} spids: [313] ) ] ) ] spids: [282 296] ) (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 2)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (Sentence child: (C {(speaker-test)} {(-b)} {(40000)} {(-t)} {(sine)} {(-f)} {(800)} {(-l)} {(1)} {(-p)} {(1)} ) terminator: <Op_Amp '&'> ) (Sentence child: (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [364] ) ] ) terminator: <Op_Amp '&'> ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:pid) op: Equal rhs: {($ VSub_Bang '$!')} spids: [371] ) ] spids: [371] ) ] spids: [319 333] ) ] spids: [16777215 376] ) ] spids: [235] ) spids: [232 235] ) (FuncDef name: Output_Off body: (BraceGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 0)}) ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(echo)} {(-e)} {(DQ (Lit_Other '\\') ('e[0m'))}) (C {(clear)})] spids: [16777215 409] ) (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 1)}) ) ) terminator: <Op_Semi ';'> ) ] action: [ (SimpleCommand words: [{(echo)} {(0)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/sys/class/leds/led0/brightness)} spids: [457] ) ] ) (SimpleCommand words: [{(echo)} {(0)}] redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/sys/class/leds/led1/brightness)} spids: [466] ) ] ) ] spids: [435 449] ) (if_arm cond: [ (Sentence child: (DParen child: (ArithBinary op_id: Arith_DEqual left: (ArithWord w:{($ VSub_Name '$OUTPUT_MODE')}) right: (ArithWord w:{(Lit_Digits 2)}) ) ) terminator: <Op_Semi ';'> ) ] action: [(C {(kill)} {(-9)} {($ VSub_Name '$pid')})] spids: [472 486] ) ] spids: [16777215 502] ) ] spids: [387] ) spids: [384 387] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:CHAR_CURRENT) op:Equal rhs:{(0)} spids:[522])] spids: [522] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FP_TEXTFILE_INPUT) op: Equal rhs: {(DQ ($ VSub_Name '$HOME') (/dietpi-morsecode))} spids: [531] ) ] spids: [531] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:FP_TEXTFILE_LOWERCASE) op: Equal rhs: {(DQ (/tmp/.dietpi-morsecode_lowercase))} spids: [538] ) ] spids: [538] ) (Assignment keyword: Assign_None pairs: [(assign_pair lhs:(LhsName name:MC_DURATION_UNIT) op:Equal rhs:{(0.15)} spids:[549])] spids: [549] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MC_DURATION_DASH) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(-)}) (C {(awk)} {(DQ ('{print ') ($ VSub_Name '$MC_DURATION_UNIT') (' * 3}'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [558 572] ) } spids: [557] ) ] spids: [557] ) (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:MC_DURATION_WORD) op: Equal rhs: { (CommandSubPart command_list: (CommandList children: [ (Pipeline children: [ (C {(echo)} {(-)}) (C {(awk)} {(DQ ('{print ') ($ VSub_Name '$MC_DURATION_UNIT') (' * 7}'))}) ] negated: F ) ] ) left_token: <Left_CommandSub '$('> spids: [580 594] ) } spids: [579] ) ] spids: [579] ) (FuncDef name: Mc_Convert_Input_Textfile_Lowercase body: (BraceGroup children: [ (C {(echo)} {(-e)} {(DQ (DietPi-Morsecode) (Lit_Other '\\') (n))}) (C {(echo)} {(-e)} {(DQ ('Converting input file to lowercase......') (Lit_Other '\\') (n))} ) (Sentence child: (C {(dd)} {(Lit_VarLike 'if=') (DQ ($ VSub_Name '$FP_TEXTFILE_INPUT'))} {(Lit_VarLike 'of=') (DQ ($ VSub_Name '$FP_TEXTFILE_LOWERCASE'))} {(Lit_VarLike 'conv=') (lcase)} ) terminator: <Op_Amp '&'> ) (SimpleCommand redirects: [ (Redir op_id: Redir_Great fd: 16777215 arg_word: {(/dev/null)} spids: [643] ) ] ) (C {(echo)} {(-e)} { (DQ (Completed) (Lit_Other '\\') ('nRendering to Output_Mode ') ($ VSub_Name '$OUTPUT_MODE') ) } ) ] spids: [601] ) spids: [598 601] ) (FuncDef name: Mc_Dot body: (BraceGroup children: [ (C {(Output_On)}) (C {(sleep)} {($ VSub_Name '$MC_DURATION_UNIT')}) (C {(Output_Off)}) (C {(sleep)} {($ VSub_Name '$MC_DURATION_UNIT')}) ] spids: [668] ) spids: [665 668] ) (FuncDef name: Mc_Dash body: (BraceGroup children: [ (C {(Output_On)}) (C {(sleep)} {($ VSub_Name '$MC_DURATION_DASH')}) (C {(Output_Off)}) (C {(sleep)} {($ VSub_Name '$MC_DURATION_UNIT')}) ] spids: [696] ) spids: [693 696] ) (FuncDef name: Mc_Next_Char body: (BraceGroup children:[(C {(sleep)} {($ VSub_Name '$MC_DURATION_DASH')})] spids:[724]) spids: [721 724] ) (FuncDef name: Mc_Next_Word body: (BraceGroup children:[(C {(sleep)} {($ VSub_Name '$MC_DURATION_WORD')})] spids:[741]) spids: [738 741] ) (FuncDef name: Mc_End_of_Message body: (BraceGroup children: [ (C {(Mc_Next_Word)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Next_Word)}) ] spids: [762] ) spids: [759 762] ) (FuncDef name: Convert_Text_To_Morsecode body: (BraceGroup children: [ (Case to_match: {(DQ ($ VSub_Name '$CHAR_CURRENT'))} arms: [ (case_arm pat_list: [{(0)}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) ] spids: [808 809 827 16777215] ) (case_arm pat_list: [{(1)}] action: [ (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) ] spids: [830 831 849 16777215] ) (case_arm pat_list: [{(2)}] action: [ (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) ] spids: [852 853 871 16777215] ) (case_arm pat_list: [{(3)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [874 875 893 16777215] ) (case_arm pat_list: [{(4)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [896 897 915 16777215] ) (case_arm pat_list: [{(5)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [918 919 937 16777215] ) (case_arm pat_list: [{(6)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [940 941 959 16777215] ) (case_arm pat_list: [{(7)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [962 963 981 16777215] ) (case_arm pat_list: [{(8)}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) ] spids: [984 985 1003 16777215] ) (case_arm pat_list: [{(9)}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) ] spids: [1006 1007 1025 16777215] ) (case_arm pat_list: [{(a)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1028 1029 1038 16777215] ) (case_arm pat_list: [{(b)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1041 1042 1057 16777215] ) (case_arm pat_list: [{(c)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1060 1061 1076 16777215] ) (case_arm pat_list: [{(d)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1079 1080 1092 16777215] ) (case_arm pat_list: [{(e)}] action: [(C {(Mc_Dot)})] spids: [1095 1096 1102 16777215] ) (case_arm pat_list: [{(f)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1105 1106 1121 16777215] ) (case_arm pat_list: [{(g)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1124 1125 1137 16777215] ) (case_arm pat_list: [{(h)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1140 1141 1156 16777215] ) (case_arm pat_list: [{(i)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1159 1160 1169 16777215] ) (case_arm pat_list: [{(j)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [1172 1173 1188 16777215] ) (case_arm pat_list: [{(k)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1191 1192 1204 16777215] ) (case_arm pat_list: [{(l)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1207 1208 1223 16777215] ) (case_arm pat_list: [{(m)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [1226 1227 1236 16777215] ) (case_arm pat_list: [{(n)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1239 1240 1249 16777215] ) (case_arm pat_list: [{(o)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [1252 1253 1265 16777215] ) (case_arm pat_list: [{(p)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1268 1269 1284 16777215] ) (case_arm pat_list: [{(q)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1287 1288 1303 16777215] ) (case_arm pat_list: [{(r)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1306 1307 1319 16777215] ) (case_arm pat_list: [{(s)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1322 1323 1335 16777215] ) (case_arm pat_list: [{(t)}] action: [(C {(Mc_Dash)})] spids: [1338 1339 1345 16777215] ) (case_arm pat_list: [{(u)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1348 1349 1361 16777215] ) (case_arm pat_list: [{(v)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1364 1365 1380 16777215] ) (case_arm pat_list: [{(w)}] action: [(C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [1383 1384 1396 16777215] ) (case_arm pat_list: [{(x)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1399 1400 1415 16777215] ) (case_arm pat_list: [{(y)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)})] spids: [1418 1419 1434 16777215] ) (case_arm pat_list: [{(z)}] action: [(C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)})] spids: [1437 1438 1453 16777215] ) (case_arm pat_list: [{(DQ (.))}] action: [ (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) ] spids: [1457 1459 1480 16777215] ) (case_arm pat_list: [{(DQ (','))}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) ] spids: [1484 1486 1507 16777215] ) (case_arm pat_list: [{(DQ (':'))}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) ] spids: [1511 1513 1534 16777215] ) (case_arm pat_list: [{(DQ ("'"))}] action: [ (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) ] spids: [1538 1540 1561 16777215] ) (case_arm pat_list: [{(DQ (-))}] action: [ (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) ] spids: [1565 1567 1588 16777215] ) (case_arm pat_list: [{(DQ (/))}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)})] spids: [1592 1594 1612 16777215] ) (case_arm pat_list: [{(DQ ('@'))}] action: [ (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dash)}) (C {(Mc_Dot)}) ] spids: [1616 1618 1639 16777215] ) (case_arm pat_list: [{(DQ ('='))}] action: [(C {(Mc_Dash)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dot)}) (C {(Mc_Dash)})] spids: [1643 1645 1663 16777215] ) ] spids: [799 805 1666] ) ] spids: [795] ) spids: [792 795] ) (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(KW_Bang '!')} {(-f)} {(DQ ($ VSub_Name '$FP_TEXTFILE_INPUT'))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [ (C {(clear)}) (C {(echo)} {(-e)} { (DQ (Lit_Other '\\') ('nNo textfile was found. Please create a file at:') (Lit_Other '\\') (n) ($ VSub_Name '$FP_TEXTFILE_INPUT') (Lit_Other '\\') ('nThis file will then be converted to Morse Code.') ) } ) (ControlFlow token:<ControlFlow_Exit exit>) ] spids: [16777215 1705] ) ] spids: [16777215 1729] ) (C {(Mc_Convert_Input_Textfile_Lowercase)}) (While cond: [(C {(read)} {(-r)} {(-n1)} {(CHAR_CURRENT)})] body: (DoGroup children: [ (If arms: [ (if_arm cond: [ (Sentence child: (C {(Lit_Other '[')} {(DQ ($ VSub_Name '$CHAR_CURRENT'))} {(Lit_Other '=')} {(DQ (' '))} {(Lit_Other ']')} ) terminator: <Op_Semi ';'> ) ] action: [(C {(Mc_Next_Word)})] spids: [16777215 1787] ) ] else_action: [(C {(Mc_Next_Char)}) (C {(Convert_Text_To_Morsecode)})] spids: [1799 1810] ) ] spids: [1763 1814] ) redirects: [ (Redir op_id: Redir_Less fd: 16777215 arg_word: {(DQ ($ VSub_Name '$FP_TEXTFILE_LOWERCASE'))} spids: [1816] ) ] ) (C {(Mc_End_of_Message)}) (C {(rm)} {(DQ ($ VSub_Name '$FP_TEXTFILE_LOWERCASE'))}) (ControlFlow token:<ControlFlow_Exit exit>) ] spids: [3] ) ] )