Colin the Mathmo on Nostr: OK, I used to be able to do this, but it appears not to work any more ... what should ...
OK, I used to be able to do this, but it appears not to work any more ... what should I do instead.
In an HTML file I could have this:
<img
src="/cgi-bin/x.py?parm"
alt=""
/>
Then the "x.py" script could have this:
#!/usr/bin/python
sys.stdout.write(
file('x.png').read()
)
So the script is run and hands back the image to the HTML, which then displays it.
What can I do instead that is similarly minimalist?
To the people who know more about web-programming than I, and who can make things like this work ... thank you.
Published at
2024-08-13 14:34:06Event JSON
{
"id": "7dbf6660ab5339eb1a3dbeffb0cd110915e1c6573fceb64b4c52ee3b2e6015e2",
"pubkey": "856e04ebcd1fa217d19a9ed298e1e4740aa7f56b6ba4220248f919808c44e507",
"created_at": 1723559646,
"kind": 1,
"tags": [
[
"proxy",
"https://mathstodon.xyz/@ColinTheMathmo/112955204994351040",
"web"
],
[
"proxy",
"https://mathstodon.xyz/users/ColinTheMathmo/statuses/112955204994351040",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://mathstodon.xyz/users/ColinTheMathmo/statuses/112955204994351040",
"pink.momostr"
],
[
"-"
]
],
"content": "OK, I used to be able to do this, but it appears not to work any more ... what should I do instead.\n\nIn an HTML file I could have this:\n\n\u003cimg\n src=\"/cgi-bin/x.py?parm\"\n alt=\"\"\n /\u003e\n\nThen the \"x.py\" script could have this:\n\n#!/usr/bin/python\nsys.stdout.write(\n file('x.png').read()\n )\n\nSo the script is run and hands back the image to the HTML, which then displays it.\n\nWhat can I do instead that is similarly minimalist?\n\nTo the people who know more about web-programming than I, and who can make things like this work ... thank you.",
"sig": "4afd4879b3d5f2f16745d7411b4795f27a17bc75915993db82fd7062b18da6ccc0c8c391df03fa43cfb8302210ee9eec6c07173ce4cc934e4dd9ac0be0efb553"
}