Import HTML into CSIDE?

Due to an unfortunate series of events, I’ve lost access to the txt files for the game I’ve been working on. I’ve kept backups, because I’m not a complete idiot, but by far my most recent backups are versions of the game I exported from CSIDE as HTML in order to test on other devices.

So in short, my recovery process would be far, far easier if I could decompile this HTML back into the composite TXT docs that I could then import back into CSIDE. Is this even remotely feasible? I’m not afraid of possible solutions that might be technically complex.

1 Like

The only way I know how is to rename the file to yourfilename.txt. Once in notepad, click view and click word warp for better viewing. Everything you need will be near the bottom, although, the scenes might be in order, but everything will seem like a jumbled mess. It will take a long time to get everything back in working order. Let me do some more research.

There’s no easy/automatic way.

You can obtain your scene data via a web browser’s console: How To See Other Games' Code (current info posted in OP and Post 146 on 6/18/19) - #16 by CJW

But you’ll still be manually copying and pasting that into new separate files.

4 Likes

Following up on CJW.

Open the browser console and paste the following code. It will generate a link for each file. When you click it will download the file.

(function(){
	document.body.innerHTML = "";

	Object.entries(allScenes).forEach(([filename, content]) => {
		const a = document.createElement('a');
		const text = content.lines.join("\n");
		a.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));
		a.setAttribute('download', filename);
		a.style.display = "block";
		a.innerText = filename;
		document.body.appendChild(a);
	});
})();
8 Likes

That code worked perfectly, thank you all for the help! Saved me hours of extra work.

2 Likes