sqlite3 = require "lsqlite3" db = assert sqlite3.open "../db/posts.db" for post in db\nrows "SELECT * FROM Posts" with fout = io.open "../raw/posts/#{post.id}.textile", "w" fout\write post.body fout\close!