       # done
       console.log 'write shorturls.json'
       fs.writeFileSync shorturlsfn,JSON.stringify shorturls
+      doneShorturls = true
+      if doneShorturls and doneCache
+        process.exit 0
     else
       su = shorturls[i]
       if su.shorturl == undefined



  # work out URLs to be shortened
  # get.html?u=URL&t=TITLE[&d=DEVICETYPE][&m=MIMETYPE]&a=HELPERURL...
  # each entry...
  for entry in feed.entry when not is_hidden entry
    title = entry.title[0]


      mimeparam = if mime? then '&m='+encodeURIComponent(mime) else ''
      add_shorturl shorturls,url+mimeparam

add_fileurl = (url, fileurls) ->
    #console.log "check #{url}"
