           process.exit -1
 
         hreq.end reqs  
-        console.log 'sent '+reqs
-  
+        #console.log 'sent '+reqs
+      else
+        # recurse
+        fix_shorturls shorturls,i+1
   fix_shorturls shorturls,0
 
   # download icons and visible enclosures, populating cache.json

            process.exit -1

          res.setEncoding 'utf8'
          res.on 'data',(chunk) ->
            console.log 'shortener response: '+chunk
            jres = JSON.parse chunk
            su.shorturl = jres.id
            # recurse
            fix_shorturls shorturls,i+1


# coffee-script version of cache builder
https = require 'https'
http = require 'http'
fs = require 'fs'
xml2js = require 'xml2js'
parse_url = (require 'url').parse

if process.argv.length<3 
  console.log 'usage: coffee cb.coffee <KIOSK-ATOM-FILE>'
