plain text, and viewing it..

Observant sorts will have noticed that when you view scripts, text files, and what-not at, you get a fancy version, like this, courtesy of the textview script. It is cool, but has a couple of foibles; had, rather; today I fixed it.

Now that it's foible-free, I've ripped out its main gubbins, and inserted them into the distro machine; my cunning plan being to have it serve up all sorts of loose files (the plain text files in question), and secretly count applicable downloads in the background. That was unbelievably easy, and so I've started throwing more files into the (now infinite depth) /engine.

I also removed the /beta engine, and threw everything into the main engine (a rewrite should catch stray browsers); I may have mentioned this. What I didn't mention is that the main download engine for is also my current development beta. It's proven itself to be so robust that I'm basically gonna chuck everything in there.

As I move into this territory, the distromachine's source/download architecture is starting to look more shaky, and I'm seriously considering a ground-up re-work, basically a replacement for the Apache index listings, but with background distromachine-like capabilities; text and source highlighting; downloads counting and so on; but to the user; just a souped up directory listing. Of course, lots of the distromachine code is eminently re-usable.

Oh right, the foibles! Well, mainly the double-extension business, where .txt got you the fancy version, and the magic link led to ".text", which got you the plain version, and thanks to the wonders of raw http headers, was magically transformed back to .txt in your save-as dialog. Of course, as well as being confusing, this superbly complex functionality was tremendously easy to break, which it recently did.

After a wee think, I've reworked the whole affair, and accomplished two things; a) made it work flawlessly (I use the "qsa" rewrite flag to simply tag an extra GET variable and keep the extension exactly as it is), and b) removed lots of code in the process, aka "simplified" things, and act which always gives me incredible satisfaction.

You can grab the latest version of the textview script here, and see it working, well, pretty much all over the site. Rake about.

If anyone clicks the link at the top, and gets "mysql_backup.bash" on their hard drive, please let me know!

for now..

;o) Cor

 ©  2021 « » 21.3.4  

Welcome to!

Bugs? What bugs? Juggling two energetic boys (of very different ages) on Coronavirus lockdown, I'm unlikely to have them all fixed any time soon. Mail me! to prioritise!