Created
May 22, 2020 13:25
-
-
Save phiresky/a6a514b8392d500e46186f1bbe570e8d to your computer and use it in GitHub Desktop.
This file contains 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
<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