         dir = makeTempDir _
 
         # Download the content to a file (within our temp dir) named by the ID:
-        src = Path.join dir, content.id
-        echo 'Downloading content to temp dir... id=%j, file=%j', id, src
-        downloadFile content.url, src, _
+        file = Path.join dir, content.id
+        echo 'Downloading content to temp dir... id=%j, file=%j', id, file
+        downloadFile content.url, file, _
 
-        # TODO
+        echo 'Generating DZI for content... id=%j', id
+        dzi = createDZI file, _
 
-        # destination = processor.process source, _
-        # dzi = DZIParser.parse destination, _
+        echo 'Parsing the generated DZI... id=%j', id
+        dzi = DZIParser.parse dzi, _
+
+        # TODO: Upload!
 
         # erro 'Success! Marking content as ready... id=%j', id
         # content.markReady dzi, _


     req.pipe file


## MAIN:



config = require '../config'
crypto = require 'crypto'
DeepZoomImage = require 'deepzoomtools'
DZIParser = require './dziparser'
FS = require 'fs-extra'
OS = require 'os'
Path = require 'path'
