       console.log 'done'
 
   export: ->
-    do @generateIndex
-    do @generateAlbums
-    do @generatePages
+    @generateIndex
+    @generateAlbums
+    @generatePages
 
 
 program = require 'commander'

program.option '-t, --thumbs'
program.parse process.argv

r = new Rembrant 'library.json'

if program.thumbs
  do r.makeThumbs

if program.export
  do r.export

if program.import
  do r.importPhotos

    template = fs.readFileSync __dirname + "/views/single.html", "utf-8"
    for photo in @library.photos
      html = eco.render template, photo: photo
      @finalizeFile html, "build/#{photo.getHtmlName()}"

  finalizeFile: (content, filename) ->
    rendered = eco.render baseTemplate, content: content
