secretGeek now syndicated!

secretGeek is now available via RSS. Whether or not my dodgy RSS hack will continue to work (for how long I don't know) ... But it works okay for me.

Outputing RSS has turned out to be a very easy process. I'm not sure if I've got the right version, etc.

Just cross fingers and hope it keeps working. It does for now:

[Valid RSS]

Next thing is to move existing content into the Rss file. And to make my rapid blog page RSS aware, too.

Here are the ASP functions I use for outputting the RSS:


Public Sub SaveRSSItem(RSSItem, sFilename)
   Dim filesys, readfile, sFileContents  
   set filesys=CreateObject("Scripting.FileSystemObject")  
   set readfile = filesys.OpenTextFile(sFileName,   1, false)
   sFileContents = readfile.readall
   readfile.close      
   sFileContents = replace(sFileContents, "",  RSSItem)   
   set readfile = filesys.OpenTextFile(sFilename,   2, false)
   readfile.write(sFileContents)
   readfile.close
End Sub

Public Function MakeRssItem(sTitle, sLink, sDescription)
  Dim rss
  sLink = "http://www.secretGeek.net/" & sLink 
  rss = "" & vbcrlf
  rss = rss & "" & vbcrlf
  rss = rss & "  " & sTitle & "" & vbcrlf
  rss = rss & "    " & sLink & "" & vbcrlf
  rss = rss & "    " & _
      vbCrlf & "      " & _
      vbcrlf & "    " & vbcrlf
  rss = rss & "    " & _
     RFC1123Date(DateAdd("h", 5, Now)) & "" & vbcrlf
  rss = rss & "    Leon Bambrick" & _
      vbcrlf
  rss = rss & "    " & sLink & "" & vbcrlf
  rss = rss & "  "    
  MakeRssItem = rss
End Function




Function RFC1123Date(dateSpec) 
  Dim astrDay 
  Dim astrNum 
  Dim astrMonth 
  astrDay = Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat") 
  astrNum = Array( "00", _ 
    "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", _ 
    "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", _ 
    "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", _ 
    "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", _ 
    "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", _ 
    "51", "52", "53", "54", "55", "56", "57", "58", "59", "60") 
  astrMonth = Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", _ 
    "Jul", "Aug", "Sep", "Oct", "Nov", "Dec") 

  RFC1123Date = astrDay(WeekDay(dateSpec) - 1) & ", " & astrNum(Day(dateSpec)) _ 
    & " " & astrMonth(Month(dateSpec) - 1) & " " & Year(dateSpec) _ 
    & " " & astrNum(Hour(dateSpec)) & ":" & astrNum(Minute(dateSpec)) _ 
    & ":" & astrNum(Second(dateSpec)) & " GMT" 
  End Function 

 

I'm currently writing a book about how to build your first product. If you want to build your first product, please sign up to be notified when the book is available.

(By the way, I read every comment and often respond.)

Your comment, please?

Your Name
Your Url (optional)
Note: I may edit, reuse or delete your comment. Don't be mean.