This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- The author disclaims copyright to this source code. | |
-- Convert http://redd.it/3bxlg7 to an SQLite database | |
-- Convert the whole dataset at once like so: | |
-- find reddit_data -type f -exec time lua json2sqlite.lua {} \; | |
local cjson = require"cjson" | |
local sqlite = require"lsqlite3" | |
local db = sqlite.open("reddit_data.db") | |
db:exec[[ |