feat: complete NutriScan redesign
This commit is contained in:
1 parent
c1fe4af997
commit
f71cd167b3
163 files changed
+30802
-14169
No files matched your search
@@ -0,0 +1,16 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const html = fs.readFileSync(path.join(__dirname, 'NutriScan Redesign.html'), 'utf8');
|
||||
|
||||
// Find the template script tag
|
||||
const start = html.indexOf('type="__bundler/template">');
|
||||
const end = html.indexOf('</script>', start);
|
||||
const raw = html.slice(start + 'type="__bundler/template">'.length, end).trim();
|
||||
|
||||
try {
|
||||
const decoded = JSON.parse(raw);
|
||||
fs.writeFileSync(path.join(__dirname, 'extracted-template.html'), decoded);
|
||||
console.log('Written, length:', decoded.length);
|
||||
} catch(e) {
|
||||
console.log('Error:', e.message);
|
||||
}
|
||||
Reference in new issue
Block a user