Skip to content

Instantly share code, notes, and snippets.

@phiresky
Created May 22, 2020 13:25
Show Gist options
  • Save phiresky/a6a514b8392d500e46186f1bbe570e8d to your computer and use it in GitHub Desktop.
Save phiresky/a6a514b8392d500e46186f1bbe570e8d to your computer and use it in GitHub Desktop.
<meta charset="utf-8">
<script src="https://unpkg.com/sql.js@1.2.2/dist/sql-asm.js"></script>
<script>
async function go() {
const SQL = await initSqlJs();
const dbres = await fetch("https://rawcdn.githack.com/kotartemiy/newscatcher/b30358cf57c9f8f4a481b51c0a0884a64e0b85b2/newscatcher/data/package_rss.db");
const dbbuf = await dbres.arrayBuffer()
const db = new SQL.Database(new Uint8Array(dbbuf));
const data = [];
db.each("select * from rss_main", obj => data.push(obj));
document.write(`<pre>${JSON.stringify(data, null, 3)}</pre>`);
}
go();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment