November 2006

You are currently browsing the articles from TechToolBlog written in the month of November 2006.

Turn any RSS feed into a Podcast using Ruby

Ever wonder how to turn rss xml into a podcast mp3? Me neither, but it struck me as a really cool idea when I ran across Talkr.com, a online services which does this. I then found Audiolicious and found you can do it in 7 easy steps.


Audiolicious allows you to point it at any valid RSS feed and create MP3 Podcast. It converts the text to speech using Windows and Ruby technology.

Instructions:

  1. Unzip the Audiolicious zipfile to a directory on your computer.
  2. Install Ruby.
  3. Install the Microsoft Speech API.
  4. Install the Microsoft Mary voice.
  5. Test Audiolicious by running audiolicious.bat. The MP3’s will appear in the output directory.
  6. Configure Audiolicious by opening audiolicious.rb in your favourite text editor and changing the rss_feed and output_dir.
  7. Setup up audiolicious.bat to run daily using Windows Scheduler.

Written by Tim on November 30th, 2006 with 2 comments.
Read more articles on web 2.0 ish.



How to make a Yahoo! sitemap file using Google’s Sitemap Tool

Yahoo! has been accepting sitemaps very similar to what Google is doing with their Sitemap feeds. One exception, they do not provide you with a tool like Google does, that might make too much sense. I guess Yahoo! was behind in the game and went public without offering webmastes any tools to submit a text file containing your URL list in a plain text file. Initially I thought I could use something like Xenu - a link checking bot that gives you a list of valid html pages with no broken links. However it puts a bunch of goofy jargon in the source code that makes it very very difficult to create text file of plain jane URLs. So I ended up using Google sitemap tool to first build my url list.

See Google Sitemap help for detailed instructions . Here are the steps you need to make this happen.

  1. Download Google’s sitemap tool from sourceforge.

  2. Run this code to generator a sitemap:

    $ python sitemap_gen.py --config=

    This will generate an sitemap.xml.gz file in the location you specified in the config.xml file. You then need to :

    $ gunzip sitemap.xml.gz

  3. Next, open this sitemap.xml using your favorite text editor - I use UltraEdit. Do a search and replace with nothing for:




    Use a regular expression to search and replace with nothing for:
    *

    *

Then you should record a macro to delete the extra line breaks and leading space. I’ve attached the Macro I used in Ultra Edit. Download the Google_to_Yahoo.mac macro. Pretty straight forward. Let me know if you have an eaiser way. I do have over 5,000 URL’s so doing by any other way then automation was out of the question.

Written by Tim on November 29th, 2006 with no comments.
Read more articles on web 2.0 ish.



Adding a Javascript Confirm Alert to a .NET Checkbox control in a GridView

One issue I recently ran into dealing with the gridview control in .NET is adding a javascript confirm box when a user selects a checkbox control and have a postback event fired. The dopostback event is tied to the onclick event, so I was unable to add it to the template item itself. I ended up having to manually call the dopostback myself with the javascript below.

function confirmSubmit(mycheckbox) {
 var agree=confirm(“Are you sure you want to delete this quote?”);
 if (agree) {
 setTimeout(‘__doPostBack(\’gvQuotes$ctl07$btnDelete\’,\’\')’, 0)
 return true ;
 }
 else {
  mycheckbox.checked = false;
  return false ;
  }
}

Here is the itemtemplate code that fires the javascript code:

<asp:TemplateField HeaderText=”delete”>
<ItemTemplate>
<asp:CheckBox ID=”btnDelete” runat=”server” Text=”" 
onclick=”confirmSubmit(this)”  
OnCheckedChanged=”FireDeleteQuote”  />
<ItemStyle HorizontalAlign=”Center” Width=”0px” />
</ItemTemplate>
</asp:TemplateField>

If anyone has found an easier way to accomplish this let me know.



Adding code for checkbox control is a good idea. Coding makes everything so much more convenient, from bar code scanners to helpful web code. A symbol scanner can also simplify business processes by reading code. Partnered with a touch screen monitor these barcode readers and scanners become the ultimate in convenience.

Written by Tim on November 28th, 2006 with 2 comments.
Read more articles on asp.net.