old_contents: var fs = require('fs');
  var path = require('path');
  var when = require('when');
  var nodefn = require('when/node');
  var microformat = require('./microformat');
  var site = require('./site');
  var util = require('./util');
  
  function regexFilter(pat, files) {
      var re = new RegExp(pat);
      return files.filter(re.exec.bind(re));
  }
  
  // import posts
  util.walkDir('..\\notenoughneon.com\\2015').
      then(regexFilter.bind(null, '\.html$')).
      then(function(files) {
          return when.map(files, function (file) {
              nodefn.call(fs.readFile, file).
                  then(function(html) {
                      return microformat.getHEntryWithCard(html, '');
                  }).
                  then(site.store);
          });
      }).
      then(site.generateIndex).
      catch(function(e) {
          console.log(e.stack);
      });
  
  // copy photos
  
  util.walkDir('..\\notenoughneon.com\\2015').
      then(regexFilter.bind(null, '\.(jpg|png)$')).
      then(function(files) {
          return files.map(function(file){
              var dst = file.split(path.sep).slice(2).join('/');
              site.publisher.put(dst, fs.createReadStream(file));
          });
      }).
      catch(function(e) {
          console.log(e.stack);
      });
  
new_contents: var fs = require('fs');
  var util = require('./util');
  var site = require('./site').init(JSON.parse(fs.readFileSync('config.json')));
  
  var publisher = require('./filepublisher').init({root: '../oldsite', postRegex: '^20[0-9][0-9]/.*\.html$'});
  
  site.import(publisher).
      then(util.dump).
      catch(function (e) {
          console.log(e.stack);
      });
subject: update import script