<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.5" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments for walking towel</title>
	<link>http://walkingtowel.org</link>
	<description>by Shawn Dowler</description>
	<pubDate>Tue, 18 Nov 2008 09:40:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.5</generator>

	<item>
		<title>Comment on &#8220;The Nativity&#8221; with &#8220;Breath of Heaven&#8221; by Shawn Dowler</title>
		<link>http://walkingtowel.org/2006/12/10/the-nativity-with-breath-of-heaven/#comment-52444</link>
		<pubDate>Mon, 03 Nov 2008 08:30:16 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/12/10/the-nativity-with-breath-of-heaven/#comment-52444</guid>
					<description>@Ellen:

I do not do this for money. I would be happy to try and fulfill your request if I could get the music without the vocal track. I am curious, though... if you are doing a cantata, then why do you need the music at all? Just use your musicians and practice getting the tempo right and do it all live with no sound from the video whatsoever.</description>
		<content:encoded><![CDATA[<p>@Ellen:</p>
<p>I do not do this for money. I would be happy to try and fulfill your request if I could get the music without the vocal track. I am curious, though&#8230; if you are doing a cantata, then why do you need the music at all? Just use your musicians and practice getting the tempo right and do it all live with no sound from the video whatsoever.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on &#8220;The Nativity&#8221; with &#8220;Breath of Heaven&#8221; by Ellen</title>
		<link>http://walkingtowel.org/2006/12/10/the-nativity-with-breath-of-heaven/#comment-52336</link>
		<pubDate>Wed, 29 Oct 2008 12:54:48 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/12/10/the-nativity-with-breath-of-heaven/#comment-52336</guid>
					<description>I have the same question as Traci.  Our church is incorporating "Breath of Heaven" into a cantata and after seeing your movie clip, I won't be satisfied until we can show it with the solo.  Were you able to come up with a version minus Amy Grant's voice?  Or if I could provide the background music, would you still be able to combine that with the movie?  What would you charge to do that?  Thanks so much.</description>
		<content:encoded><![CDATA[<p>I have the same question as Traci.  Our church is incorporating &#8220;Breath of Heaven&#8221; into a cantata and after seeing your movie clip, I won&#8217;t be satisfied until we can show it with the solo.  Were you able to come up with a version minus Amy Grant&#8217;s voice?  Or if I could provide the background music, would you still be able to combine that with the movie?  What would you charge to do that?  Thanks so much.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Ten Cents in One Day by Eugene</title>
		<link>http://walkingtowel.org/2008/06/06/ten-cents-in-one-day/#comment-52156</link>
		<pubDate>Wed, 22 Oct 2008 16:03:02 +0000</pubDate>
		<guid>http://walkingtowel.org/2008/06/06/ten-cents-in-one-day/#comment-52156</guid>
					<description>Now everyone is talking about the American economy and eclections, nice to read something different. Eugene</description>
		<content:encoded><![CDATA[<p>Now everyone is talking about the American economy and eclections, nice to read something different. Eugene
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Free Help with Programming Problems by Anthony Dabney</title>
		<link>http://walkingtowel.org/2006/10/15/free-help-with-programming-problems/#comment-51348</link>
		<pubDate>Wed, 01 Oct 2008 16:53:22 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/10/15/free-help-with-programming-problems/#comment-51348</guid>
					<description>&lt;pre&gt;COCS3308                  Assignment-2 (Programming)            Due: Friday, 9/19/2008 
           Balanced Parenthesis Expression (BPE) Generation
                        
     THE FOLLOWING CFG MAY DEFINE THE SET OF BPE EXPRESSIONS:
  
        S -&#62; S R 
        S -&#62; R
        R -&#62; ( S ) 
        R -&#62; ( )  

     Objectives:

     1. Appreciate the practical utility of unambiguous grammars.
     2. Understand the process of leftmost derivations in obtaining all possible derivations.     
  
     Task:
     Your task is to write a well-structured program (in any language of your choice) 
     that generates and prints all different expressions for length of 8, 10, 12, and 14 respectively.
     For example, for the length of 4,
    we have two such expressions:    
            (())
            ()()
    and for the length of 6,
    we have five such expressions:    
            ((()))
            (()())
            (())()
            ()(())
            ()()()

     SUGGESTED Functions
  
     1.  void S(int N, int POS, CHARSTRING A)
           { 
         // N is the number of nonterminals yet to be derived and
         // it is initially half the length being sought.
         CHARSTRING Save;
         if (N==0) PRINT(A,POS)  
            // TO PRINT AN EXPRESSION found 
                  // AFTER CONVERTING EVERY NONTERMINAL TO "()"
          else  
          {
          strcpy(Save,A);
          RULE1 (N,POS,A);  // TO APPLY RULE#1 AND THEN 
                                    // RECURSIVELY CALL S() to continue
          strcpy(A,Save);
          RULE2 (N,POS,A);  // TO APPLY RULE#2 AND THEN
                                    // call R() to continue
          }
           }
       // End of S()
 
     2.  void R(SAME PARAMETERS)
       { 
         Charstring Save;
           if (N==0) PRINT(A,POS);
           else  
         { 
           strcpy(Save,A);
           RULE3 (N,POS,A);    // TO APPLY RULE#3 AND THEN CALL S() to
                   // continue
           strcpy(A,Save);
           RULE4 (N,POS,A);    // TO APPLY RULE#4, LOCATE NEXT
                                   // NONTERMINAL R AND CALL R() to continue
         }
           }  // END of R()
 
     3. void RULE1 (int MORENONT, int POS, CHARSTRING A)
        { // Applying the rule-1: S -&#62; S R
          int M;
          for ( M=MAXSIZE-1; M&#62;=POS+1; M--)
            A[M+1]=A[M];
          A[POS+1] := 'R';
          S(MORENONT-1,POS,A);     
        // as the result of applying rule-1, the number of remaining 
        // nonterminals is reduced by one.
        } // end of RULE1()
  
     4. OTHER functions:
            RULE2
        RULE3
        RULE4
        PRINT(A, Pos) 
        // This function will print the string
        // contents of 'A' after converting each remaining
        // nonterminal to be found beyond the given position
        // into "()"&lt;/pre&gt;
        
i am writing this program an i am stuck because i do not understand where i can sto p and see where the condition of right number of parethsis is  met ?</description>
		<content:encoded><![CDATA[<pre>COCS3308                  Assignment-2 (Programming)            Due: Friday, 9/19/2008
           Balanced Parenthesis Expression (BPE) Generation

     THE FOLLOWING CFG MAY DEFINE THE SET OF BPE EXPRESSIONS:

        S -&gt; S R
        S -&gt; R
        R -&gt; ( S )
        R -&gt; ( )  

     Objectives:

     1. Appreciate the practical utility of unambiguous grammars.
     2. Understand the process of leftmost derivations in obtaining all possible derivations.     

     Task:
     Your task is to write a well-structured program (in any language of your choice)
     that generates and prints all different expressions for length of 8, 10, 12, and 14 respectively.
     For example, for the length of 4,
    we have two such expressions:
            (())
            ()()
    and for the length of 6,
    we have five such expressions:
            ((()))
            (()())
            (())()
            ()(())
            ()()()

     SUGGESTED Functions

     1.  void S(int N, int POS, CHARSTRING A)
           {
         // N is the number of nonterminals yet to be derived and
         // it is initially half the length being sought.
         CHARSTRING Save;
         if (N==0) PRINT(A,POS)
            // TO PRINT AN EXPRESSION found
                  // AFTER CONVERTING EVERY NONTERMINAL TO "()"
          else
          {
          strcpy(Save,A);
          RULE1 (N,POS,A);  // TO APPLY RULE#1 AND THEN
                                    // RECURSIVELY CALL S() to continue
          strcpy(A,Save);
          RULE2 (N,POS,A);  // TO APPLY RULE#2 AND THEN
                                    // call R() to continue
          }
           }
       // End of S()

     2.  void R(SAME PARAMETERS)
       {
         Charstring Save;
           if (N==0) PRINT(A,POS);
           else
         {
           strcpy(Save,A);
           RULE3 (N,POS,A);    // TO APPLY RULE#3 AND THEN CALL S() to
                   // continue
           strcpy(A,Save);
           RULE4 (N,POS,A);    // TO APPLY RULE#4, LOCATE NEXT
                                   // NONTERMINAL R AND CALL R() to continue
         }
           }  // END of R()

     3. void RULE1 (int MORENONT, int POS, CHARSTRING A)
        { // Applying the rule-1: S -&gt; S R
          int M;
          for ( M=MAXSIZE-1; M&gt;=POS+1; M--)
            A[M+1]=A[M];
          A[POS+1] := 'R';
          S(MORENONT-1,POS,A);
        // as the result of applying rule-1, the number of remaining
        // nonterminals is reduced by one.
        } // end of RULE1()

     4. OTHER functions:
            RULE2
        RULE3
        RULE4
        PRINT(A, Pos)
        // This function will print the string
        // contents of 'A' after converting each remaining
        // nonterminal to be found beyond the given position
        // into "()"</pre>
<p>i am writing this program an i am stuck because i do not understand where i can sto p and see where the condition of right number of parethsis is  met ?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Ninjas Versus Pirates At Home by Starlit</title>
		<link>http://walkingtowel.org/2006/10/13/ninjas-versus-pirates-at-home/#comment-50188</link>
		<pubDate>Mon, 08 Sep 2008 15:44:37 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/10/13/ninjas-versus-pirates-at-home/#comment-50188</guid>
					<description>If you are interested in pirates, here is a link that you may be interested in.  It's about Jean Lafitte the pirate.  He was a pirate during the 18th century in the Gulf of Mexico.  www.squidoo.com/jeanlafitte</description>
		<content:encoded><![CDATA[<p>If you are interested in pirates, here is a link that you may be interested in.  It&#8217;s about Jean Lafitte the pirate.  He was a pirate during the 18th century in the Gulf of Mexico.  <a href="http://www.squidoo.com/jeanlafitte" rel="nofollow">www.squidoo.com/jeanlafitte</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on LDS Church Punishing Procrastinators by Matt C</title>
		<link>http://walkingtowel.org/2007/05/26/lds-church-punishing-procrastinators/#comment-49830</link>
		<pubDate>Wed, 03 Sep 2008 07:07:35 +0000</pubDate>
		<guid>http://walkingtowel.org/2007/05/26/lds-church-punishing-procrastinators/#comment-49830</guid>
					<description>Shawn,

I noticed your name and blog from By Common Consent. I also noticed that you might have been one of the lucky to get a Words of Joseph Smith in pdf. Are there any circumstances in which you would share with me? It is strictly for personal use. 

Thanks for your consideration!
Matt C</description>
		<content:encoded><![CDATA[<p>Shawn,</p>
<p>I noticed your name and blog from By Common Consent. I also noticed that you might have been one of the lucky to get a Words of Joseph Smith in pdf. Are there any circumstances in which you would share with me? It is strictly for personal use. </p>
<p>Thanks for your consideration!<br />
Matt C
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Record Streaming Audio with Linux: Part II by Shawn Dowler</title>
		<link>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48414</link>
		<pubDate>Sat, 09 Aug 2008 00:47:33 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48414</guid>
					<description>Quite honestly, I don't know how you would accomplish pausing the recording. It's streaming live, so you certainly can't stop that part, but it may be possible to divert the stream through the fifos to &lt;code&gt;/dev/null&lt;/code&gt; when a button is pressed and go back again afterward.

I honestly don't have the "code fu" to do anything like that or to answer your question without a lot of fiddling and researching.  I'm glad that you find the code useful, and I do appreciate your posting here with updates when you make interesting modifications.</description>
		<content:encoded><![CDATA[<p>Quite honestly, I don&#8217;t know how you would accomplish pausing the recording. It&#8217;s streaming live, so you certainly can&#8217;t stop that part, but it may be possible to divert the stream through the fifos to <code>/dev/null</code> when a button is pressed and go back again afterward.</p>
<p>I honestly don&#8217;t have the &#8220;code fu&#8221; to do anything like that or to answer your question without a lot of fiddling and researching.  I&#8217;m glad that you find the code useful, and I do appreciate your posting here with updates when you make interesting modifications.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Record Streaming Audio with Linux: Part II by Xwang</title>
		<link>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48391</link>
		<pubDate>Fri, 08 Aug 2008 14:27:48 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48391</guid>
					<description>Hi,
I've done the following script which acts as a "wizard" with some pop up that enables the user to pass the input to the recorder.
Do you like it?
Do you think is it possible to modify it in order to pause the recording?
Thank you,
Xwang
[bash]
#!/bin/bash
# radioRecoder.sh
# v0.2.0 - 20080808 :-)
# Xwang 
# Released under GPL 2.0 and following (can you help me and tell if it is GPL3 compliant?)

# This script acts as a wizard enabling the user to select the URL to listen and eventually rip it after having specified
# the directory and the file name
# The cancel button is used to go to the previous page
# To exit the program press cancel in the URL page and follow the instruction


# TBD
# check if parameter is passed or not
# modify parmeters so that recording can be done without user iteration
# capture Ctrl-C in order to clean all temporary files and kill opened processes before closing
# put confirmation on registration stop
# open the directory where last file has been saved (maybe asking for it) at the end of the recording
# translate messanges
# 



# assign as default stream value the one passed ad first parameters if any (check TBD)
STREAM=$1

TEMPDIR=/tmp
# inizialize variables
EXIT=1
STATE=1
PIDlistener2=""
PIDrecorder2=""

while [ $EXIT -eq 1 ]
do
	case $STATE in 
	0)
		kdialog --title "RadioRecorder" --yesno "Do you want to exit the program?"
		EXIT=$?
		if [ $EXIT -eq 1 ]
		then
			STATE=1
		fi
	;;
	1) 
	# ask radio stream URL
		STREAM=`kdialog --title "RadioRecorder" --inputbox "Insert the radio stream url" $1 `
		STREAMBUTTON=$?
		if [ $STREAMBUTTON -eq 1 ]
		then
			STATE=0
		else
			# start mplayer in background to listen to the radio only if the ok button has been selected else exit 
#			xterm -e mplayer -vo null -vc null -cache 512 $STREAM&#38;
			mplayer -vo null -vc null -cache 512 $STREAM&#38;
			PIDlistener=$! # listener PID
			while [ -z $PIDlistener2 ]
			do
				#repeat the check till PIDlistener2 is correctly detected 
				PIDlistener2=`ps -ef&#124; awk '$3 == '$PIDlistener' { print $2 }'`
			done
			STATE=2
		fi
	;;
	2)
	# select action to do
		ACTION=`kdialog --title "RadioRecorder" --menu "Select an action:" 1 "Change URL" 2 "Record stream"`
		ACTIONBUTTON=$?

		if [ $ACTIONBUTTON -eq 1 ]
		then
			ACTION=$ACTIONBUTTON # if cancel is selected go back to url dialog
		fi
		if [ $ACTION -eq 1 ]
		then
			#if Change URL or Cancel has been selected kill listener and go back to URL page 
			#kill listener processes
			kill -9 $PIDlistener2
			kill -9 $PIDlistener
			# reinitialize PID variables
			PIDlistener=""
			PIDlistener2=""
			STATE=1
		else
			STATE=3
		fi	
	;;
	3)
	# ask destination directory -- default home
		
		DIR=$HOME
		DIR=`kdialog --title "RadioRecorder - Select destination directory" --getexistingdirectory $DIR` #default destination directory is the user home
		DIRBUTTON=$?
		if [ $DIRBUTTON -eq 1 ]
		then
			#if Cancel has been selected go back to action page
			STATE=2
		else
			STATE=4
		fi
	;;
	4)
	# ask file name at which will be added the date and eventually record stream
		FILENAME="radio"
		FILENAME=`kdialog --title "RadioRecorder - Save as" --inputbox "Insert the file name (date will be automatically added)" $FILENAME`
		FILENAMEBUTTON=$?
		if [ $FILENAMEBUTTON -eq 1 ]
		then
			#if Cancel has been selected go back to action page
			STATE=3
		else
			#capture stream
			DATE=`date +%Y_%m_%d_%H%M%S`
			TEMPFILE=$TEMPDIR/$FILENAME-$DATE
			FILE=$DIR/$FILENAME-$DATE
			mkfifo $TEMPFILE.wav
			lame $TEMPFILE.wav $FILE.mp3&#62;/dev/null&#38;
			PIDconverter=$! #converter PIN
# 			xterm -e mplayer -cache 512 -vo null -vc null -ao pcm:fast:file="$TEMPFILE.wav" $STREAM&#62;/dev/null&#38;
			mplayer -cache 512 -vo null -vc null -ao pcm:fast:file="$TEMPFILE.wav" $STREAM&#62;/dev/null&#38;
			PIDrecorder=$! #recorder PIN
			while [ -z $PIDrecorder2 ]
			do
				#repeat the check till PIDrecorder2 is correctly detected 
				PIDrecorder2=`ps -ef&#124; awk '$3 == '$PIDrecorder' { print $2 }'`
			done			
			kdialog --msgbox "Press OK button to stop recording"
			#stop recording
			#kill converter

			kill -9 $PIDconverter
			#kill recorder processes
			kill -9 $PIDrecorder2
			kill -9 $PIDrecorder
			# reinitialize PID variables
			PIDconverter=""
			PIDrecorder=""
			PIDrecorder2=""
			#removing temporary file
			rm $TEMPFILE.wav
			#go back to action page
			STATE=2
		fi
	;;
	esac
done

kdialog --title "RadioRecorder" --msgbox "Thank you for using radioRecorder"
echo "Bye Bye"
exit
[/bash]</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I&#8217;ve done the following script which acts as a &#8220;wizard&#8221; with some pop up that enables the user to pass the input to the recorder.<br />
Do you like it?<br />
Do you think is it possible to modify it in order to pause the recording?<br />
Thank you,<br />
Xwang</p>
<div class="igBar"><span id="lbash-1"><a href="#" onclick="javascript:showCodeTxt('bash-1'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">BASH:</span>
<div id="bash-1">
<div class="bash">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/bin/bash</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># radioRecoder.sh</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># v0.2.0 - 20080808 :-)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># Xwang </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># Released under GPL 2.0 and following (can you help me and tell if it is GPL3 compliant?)</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># This script acts as a wizard enabling the user to select the URL to listen and eventually rip it after having specified</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># the directory and the file name</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># The cancel button is used to go to the previous page</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># To exit the program press cancel in the URL page and follow the instruction</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># TBD</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># check if parameter is passed or not</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># modify parmeters so that recording can be done without user iteration</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># capture Ctrl-C in order to clean all temporary files and kill opened processes before closing</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># put confirmation on registration stop</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># open the directory where last file has been saved (maybe asking for it) at the end of the recording</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># translate messanges</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># assign as default stream value the one passed ad first parameters if any (check TBD)</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">STREAM=</span>$<span style="color: #cc66cc;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">TEMPDIR=</span>/tmp</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># inizialize variables</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">EXIT=</span><span style="color: #cc66cc;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">PIDlistener2=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">PIDrecorder2=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$EXIT</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">do</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">$STATE</span> <span style="color: #b1b100;">in</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder&#8221;</span> &#8211;yesno <span style="color: #ff0000;">&#8220;Do you want to exit the program?&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">EXIT=</span>$?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$EXIT</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># ask radio stream URL</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STREAM=</span>`kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder&#8221;</span> &#8211;inputbox <span style="color: #ff0000;">&#8220;Insert the radio stream url&#8221;</span> $<span style="color: #cc66cc;color:#800000;">1</span> `</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STREAMBUTTON=</span>$?</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$STREAMBUTTON</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># start mplayer in background to listen to the radio only if the ok button has been selected else exit </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;xterm -e mplayer -vo null -vc null -cache 512 $STREAM&amp;amp;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mplayer -vo null -vc null -cache <span style="color: #cc66cc;color:#800000;">512</span> <span style="color: #0000ff;">$STREAM</span>&amp;amp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDlistener=</span>$! <span style="color: #808080; font-style: italic;"># listener PID</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#91;</span> -z <span style="color: #0000ff;">$PIDlistener2</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">do</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#repeat the check till PIDlistener2 is correctly detected </span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDlistener2=</span>`ps -ef| awk <span style="color: #ff0000;">&#8216;$3 == &#8216;</span><span style="color: #0000ff;">$PIDlistener</span><span style="color: #ff0000;">&#8216; { print $2 }&#8217;</span>`</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">done</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #cc66cc;color:#800000;">2</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># select action to do</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION=</span>`kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder&#8221;</span> &#8211;menu <span style="color: #ff0000;">&#8220;Select an action:&#8221;</span> <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #ff0000;">&#8220;Change URL&#8221;</span> <span style="color: #cc66cc;color:#800000;">2</span> <span style="color: #ff0000;">&#8220;Record stream&#8221;</span>`</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTIONBUTTON=</span>$?</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$ACTIONBUTTON</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">ACTION=</span><span style="color: #0000ff;">$ACTIONBUTTON</span> <span style="color: #808080; font-style: italic;"># if cancel is selected go back to url dialog</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$ACTION</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#if Change URL or Cancel has been selected kill listener and go back to URL page </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#kill listener processes</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">kill</span> -<span style="color: #cc66cc;color:#800000;">9</span> <span style="color: #0000ff;">$PIDlistener2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">kill</span> -<span style="color: #cc66cc;color:#800000;">9</span> <span style="color: #0000ff;">$PIDlistener</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># reinitialize PID variables</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDlistener=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDlistener2=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">3</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span>&nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #cc66cc;color:#800000;">3</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># ask destination directory &#8212; default home</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DIR=</span><span style="color: #0000ff;">$HOME</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DIR=</span>`kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder - Select destination directory&#8221;</span> &#8211;getexistingdirectory <span style="color: #0000ff;">$DIR</span>` <span style="color: #808080; font-style: italic;">#default destination directory is the user home</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DIRBUTTON=</span>$?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$DIRBUTTON</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#if Cancel has been selected go back to action page</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">2</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">4</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #cc66cc;color:#800000;">4</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># ask file name at which will be added the date and eventually record stream</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FILENAME=</span><span style="color: #ff0000;">&#8220;radio&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FILENAME=</span>`kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder - Save as&#8221;</span> &#8211;inputbox <span style="color: #ff0000;">&#8220;Insert the file name (date will be automatically added)&#8221;</span> <span style="color: #0000ff;">$FILENAME</span>`</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FILENAMEBUTTON=</span>$?</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#91;</span> <span style="color: #0000ff;">$FILENAMEBUTTON</span> -eq <span style="color: #cc66cc;color:#800000;">1</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">then</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#if Cancel has been selected go back to action page</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">3</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#capture stream</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">DATE=</span>`date +%Y_%m_%d_%H%M%S`</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">TEMPFILE=</span><span style="color: #0000ff;">$TEMPDIR</span>/<span style="color: #0000ff;">$FILENAME</span>-<span style="color: #0000ff;">$DATE</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">FILE=</span><span style="color: #0000ff;">$DIR</span>/<span style="color: #0000ff;">$FILENAME</span>-<span style="color: #0000ff;">$DATE</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mkfifo <span style="color: #0000ff;">$TEMPFILE</span>.wav</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lame <span style="color: #0000ff;">$TEMPFILE</span>.wav <span style="color: #0000ff;">$FILE</span>.mp3&amp;gt;/dev/null&amp;amp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDconverter=</span>$! <span style="color: #808080; font-style: italic;">#converter PIN</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># &nbsp; &nbsp; &nbsp; xterm -e mplayer -cache 512 -vo null -vc null -ao pcm:fast:file=&quot;$TEMPFILE.wav&quot; $STREAM&amp;gt;/dev/null&amp;amp;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mplayer -cache <span style="color: #cc66cc;color:#800000;">512</span> -vo null -vc null -ao pcm:fast:<span style="color: #0000ff;">file=</span><span style="color: #ff0000;">&#8220;$TEMPFILE.wav&#8221;</span> <span style="color: #0000ff;">$STREAM</span>&amp;gt;/dev/null&amp;amp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDrecorder=</span>$! <span style="color: #808080; font-style: italic;">#recorder PIN</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">while</span> <span style="color: #66cc66;">&#91;</span> -z <span style="color: #0000ff;">$PIDrecorder2</span> <span style="color: #66cc66;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">do</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#repeat the check till PIDrecorder2 is correctly detected </span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDrecorder2=</span>`ps -ef| awk <span style="color: #ff0000;">&#8216;$3 == &#8216;</span><span style="color: #0000ff;">$PIDrecorder</span><span style="color: #ff0000;">&#8216; { print $2 }&#8217;</span>`</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">done</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kdialog &#8211;msgbox <span style="color: #ff0000;">&#8220;Press OK button to stop recording&#8221;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#stop recording</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#kill converter</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">kill</span> -<span style="color: #cc66cc;color:#800000;">9</span> <span style="color: #0000ff;">$PIDconverter</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#kill recorder processes</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">kill</span> -<span style="color: #cc66cc;color:#800000;">9</span> <span style="color: #0000ff;">$PIDrecorder2</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">kill</span> -<span style="color: #cc66cc;color:#800000;">9</span> <span style="color: #0000ff;">$PIDrecorder</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;"># reinitialize PID variables</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDconverter=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDrecorder=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">PIDrecorder2=</span><span style="color: #ff0000;">&#8220;&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#removing temporary file</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rm <span style="color: #0000ff;">$TEMPFILE</span>.wav</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">#go back to action page</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0000ff;">STATE=</span><span style="color: #cc66cc;color:#800000;">2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">fi</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ;;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #b1b100;">esac</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">done</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">kdialog &#8211;title <span style="color: #ff0000;">&#8220;RadioRecorder&#8221;</span> &#8211;msgbox <span style="color: #ff0000;">&#8220;Thank you for using radioRecorder&#8221;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">&#8220;Bye Bye&#8221;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">exit</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Record Streaming Audio with Linux: Part II by Xwang</title>
		<link>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48293</link>
		<pubDate>Wed, 06 Aug 2008 08:01:02 +0000</pubDate>
		<guid>http://walkingtowel.org/2006/03/03/record-streaming-audio-with-linux-part-ii/#comment-48293</guid>
					<description>Hi,
how can I add a simple frontend which permits to insert:
1) the location where to save the stream
2) the url
2) the recording time
Moreover I would like to be able to start and stop the recording using a record and a stop button.
I've done in the past a simple gui using perl, but I don't know how to modify the script in order to stop the registration using the gui</description>
		<content:encoded><![CDATA[<p>Hi,<br />
how can I add a simple frontend which permits to insert:<br />
1) the location where to save the stream<br />
2) the url<br />
2) the recording time<br />
Moreover I would like to be able to start and stop the recording using a record and a stop button.<br />
I&#8217;ve done in the past a simple gui using perl, but I don&#8217;t know how to modify the script in order to stop the registration using the gui
</p>
]]></content:encoded>
				</item>
	<item>
		<title>Comment on Ten Cents in One Day by Alyssa Wilson</title>
		<link>http://walkingtowel.org/2008/06/06/ten-cents-in-one-day/#comment-47593</link>
		<pubDate>Mon, 21 Jul 2008 05:56:44 +0000</pubDate>
		<guid>http://walkingtowel.org/2008/06/06/ten-cents-in-one-day/#comment-47593</guid>
					<description>Shawn--  I was roommates with your wife in the MTC.  I've been taking a trip down memory lane and trying to track people down to see how life has been treating them.  Forgive me for leaving this comment on your website but it was the only contact I could find for her.  Please pass my email on to her and have her drop me a line if she has time.  Thanks!  --Alyssa Wilson</description>
		<content:encoded><![CDATA[<p>Shawn&#8211;  I was roommates with your wife in the MTC.  I&#8217;ve been taking a trip down memory lane and trying to track people down to see how life has been treating them.  Forgive me for leaving this comment on your website but it was the only contact I could find for her.  Please pass my email on to her and have her drop me a line if she has time.  Thanks!  &#8211;Alyssa Wilson
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
