Skip to content

Commit 8fc2c43

Browse files
committed
feat: new embeds
1 parent 8db186b commit 8fc2c43

File tree

9 files changed

+189
-33
lines changed

9 files changed

+189
-33
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
11
# SQLite Reader
2+
23
[A web app where you can view your SQLite database](https://sqlitereader.com)
34

45
# Changelog
6+
7+
## 25/03/2025
8+
9+
- Added puppeteer script to generate embed images
10+
- Storytime: MicroLink uses DigitialOcean for its services, however I had to block DigitalOcean as I was getting 1,000+ requests an hour sometimes trying to "exploit" wordpress stuff, so I just straight up blocked the ASN :p
11+
512
## 18/03/2025
13+
614
- Added footer to site
715
- Updated `sql.js` from 1.12 to 1.13
816

917
## 14/03/2025
18+
1019
- Removed API/backend for parsing SQLite databases
1120
- Moved everything to local processing using `sql.js`
1221
- Added SQLite exports to the following languages

bun.lock

Lines changed: 148 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

embed.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import path from "path";
2+
3+
import puppeteer from "puppeteer";
4+
5+
(async () => {
6+
const browser = await puppeteer.launch({ headless: false });
7+
const page = await browser.newPage();
8+
9+
await page.goto("http://localhost:8010");
10+
await page.setViewport({ width: 1920, height: 1080 });
11+
12+
await page.screenshot({
13+
path: path.resolve(process.cwd(), "./public/screenshot_home.png"),
14+
});
15+
16+
await page.goto("http://localhost:8010/convert");
17+
await page.screenshot({
18+
path: path.resolve(process.cwd(), "./public/screenshot_convert.png"),
19+
});
20+
21+
await browser.close();
22+
})();

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
"start": "next start --port 8010",
99
"lint": "eslint . --ext .ts,.tsx -c .eslintrc.json",
1010
"lint:fix": "eslint . --ext .ts,.tsx -c .eslintrc.json --fix",
11-
"updatesql": "cp ./node_modules/sql.js/dist/sql-wasm.wasm ./public/sql-wasm.wasm"
11+
"updatesql": "cp ./node_modules/sql.js/dist/sql-wasm.wasm ./public/sql-wasm.wasm",
12+
"embed": "bun embed.ts"
1213
},
1314
"dependencies": {
1415
"@million/lint": "^1.0.14",
1516
"bun-types": "^1.1.39",
1617
"jszip": "^3.10.1",
1718
"next": "15.2.3",
19+
"puppeteer": "^24.4.0",
1820
"react": "^19.0.0",
1921
"react-dom": "^19.0.0",
2022
"react-icons": "^5.4.0",
@@ -29,6 +31,7 @@
2931
"@types/sql.js": "^1.4.9",
3032
"@typescript-eslint/eslint-plugin": "7.2.0",
3133
"@typescript-eslint/parser": "7.2.0",
34+
"concurrently": "^9.1.2",
3235
"eslint": "^8.57.0",
3336
"eslint-config-next": "15.1.0",
3437
"eslint-config-prettier": "^8.2.0",

pages/convert.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,20 +202,14 @@ export default function Home() {
202202
/>
203203
<meta content="website" property="og:type" />
204204
<meta content="https://sqlitereader.com" property="og:url" />
205-
<meta
206-
content="https://api.microlink.io/?url=https://sqlitereader.com/convert&amp;screenshot=true&amp;embed=screenshot.url&amp;overlay.browser=dark"
207-
property="og:image"
208-
/>
205+
<meta content="./screenshot_convert.png" property="og:image" />
209206
<meta content="summary_large_image" name="twitter:card" />
210207
<meta content="SQLite Database Viewer" name="twitter:title" />
211208
<meta
212209
content="Easily convert and export your SQLite database to CSV, JSON, SQL, and more — right in your web browser! No downloads, no setup. Just upload your file, select a format, and export your data instantly, all for free!"
213210
name="twitter:description"
214211
/>
215-
<meta
216-
content="https://api.microlink.io/?url=https://sqlitereader.com/convert&amp;screenshot=true&amp;embed=screenshot.url&amp;overlay.browser=dark"
217-
name="twitter:image"
218-
/>
212+
<meta content="./screenshot_convert.png" name="twitter:image" />
219213
</Head>
220214
<div style={{ color: "var(--text-color)" }}>
221215
<Navbar />

pages/index.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -179,20 +179,14 @@ export default function Home() {
179179
/>
180180
<meta content="website" property="og:type" />
181181
<meta content="https://sqlitereader.com" property="og:url" />
182-
<meta
183-
content="https://api.microlink.io/?url=https://sqlitereader.com/&amp;screenshot=true&amp;embed=screenshot.url&amp;overlay.browser=dark"
184-
property="og:image"
185-
/>
182+
<meta content="./screenshot_home.png" property="og:image" />
186183
<meta content="summary_large_image" name="twitter:card" />
187184
<meta content="SQLite Database Viewer" name="twitter:title" />
188185
<meta
189186
content="Need to inspect an SQLite database without hassle? Our free online viewer lets you upload and browse your data instantly—no downloads, no setup. Open, search, and analyze your database right in your web browser with ease!"
190187
name="twitter:description"
191188
/>
192-
<meta
193-
content="https://api.microlink.io/?url=https://sqlitereader.com/&amp;screenshot=true&amp;embed=screenshot.url&amp;overlay.browser=dark"
194-
name="twitter:image"
195-
/>
189+
<meta content="./screenshot_home.png" name="twitter:image" />
196190
</Head>
197191
<div style={{ color: "var(--text-color)" }}>
198192
<Navbar />

public/screenshot_convert.png

94.2 KB
Loading

public/screenshot_home.png

76.8 KB
Loading

public/sitemap.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
22
<url>
33
<loc>https://sqlitereader.com/</loc>
4-
<lastmod>2025-03-18T00:00:00.000Z</lastmod>
4+
<lastmod>2025-03-25T00:00:00.000Z</lastmod>
55
<changefreq>daily</changefreq>
66
<priority>1</priority>
77
</url>
88
<url>
99
<loc>https://sqlitereader.com/convert</loc>
10-
<lastmod>2025-03-18T00:00:00.000Z</lastmod>
10+
<lastmod>2025-03-25T00:00:00.000Z</lastmod>
1111
<changefreq>daily</changefreq>
1212
<priority>1</priority>
1313
</url>

0 commit comments

Comments
 (0)