Thursday, December 15, 2016

Technicalia

py2html

I poured a lot of hours into my free on-line Oregon Curriculum Network resources over the years.

I learned how to configure CGI scripts to run, meaning an URL like:

http://4dsolutions.net/cgi-bin/py2html.cgi?script=/ocn/python/x3dtoyz.py

...actually runs Python on the server.

In this case, py2html.cgi is something I grabbed for free, on-line, authored by Marc-Andre Lemberg of eGenix.com (Public License) and making use of Just van Rossum's PyFontify (Just is GvR's bro).

All this stopped working awhile back.  I wasn't too worried about it, as anyone wanting to see the source code in whatever target file still could.  py2html.cgi simply colorizes Python code while creating HTML, making it pretty to look at, but not what you'd cut and paste.

However it finally got to me that this feature was broken.  I wanted to fix it!

I think I must've tried fixing it before.  The permissions were off, too liberal.  I needed to chmod 711 *.cgi within the ssh shell.  That fixed some other simpler scripts right away, telling me I was on the right track.

But I'd still get a 500 error code from py2html.cgi.  Why?

Fortunately I could run this script directly, on the server, no CGI mode required and from doing that learned I had some Windows line endings corrupting the code -- plus another typo revealed in vim, a wayward backslash. The Linux shell complained of a python^M in the #! (shebang) line.

After the necessary dos2unix repair, which my provider has on tap, everything worked, I'm happy to say.

I pay money to keep these websites alive.  I was hoping to get more traction with the core essentials of Bucky Fuller's Synergetics as I understood them.  I've been on this track for a long time.

Unfortunately for me (and I'd argue for many others besides me), the ambient culture has not expressed much interest in such projects and the Fuller stuff has mostly fallen by the wayside.

A niche subculture keeps it going.

I mostly leave Synergetics on the Web unchanged (I added to the list of dome vendors last night, another adventure in oiling some rusty joints, dusting off old skills).  I think of it as part of the World Game Museum.