Blog Summary (3)

If you would like to make links in HTML, this is one way:

BEGIN {FS = "[<>]"}
/<h2 class='date-header'>/ {date=$5; if(length(date)==9) date="0" date; month=substr(date,1,2); day  =substr(date,4,2); year =substr(date,7,4) }
/post-title entry-title/ {getline;printf("%2s-%2s-%2s <%s>%s</a>\n",year,month,day,$2,$3)}

I know this awk program is not very cool, but it works, and you will get somthing like this:

2011-08-22 <a href='http://yourFBblog.com/2011/08/taxi-driver.html'>Taxi Driver</a>
2011-09-04 <a href='http://yourFBblog.com/2011/09/the-accused'>The Accused</a>
2011-09-09 <a href='http://yourFBblog.com/2011/09/the-silence-of-the-lambs'>The Silence of the Lambs</a>

You can filter the list by checking if the title contains some particular words.

% gawk -f myprog.awk 201*_01_archive.html | sort | egrep -i 'CW|morse|QRP'

This will give you the list of links which seems to relate to ham radio.

One practical example is here:
http://spinorlab.wordpress.com/links/

Leave a Reply

Your email address will not be published. Required fields are marked *