Friday, March 13, 2026

Script To Pretty-Up These Posts; And Sardine Diet Revisited

I entitled the   last post in reference to: "The Sardine Diet...etc.," 

It turns you green, but is otherwise healthy...

Then, I never
  got around to addressing that particular, out of the dietary adjustments I have been making of late. That was almost like an artifact of the pre-sardine diet, with its concomitant brain fog and reduced general awareness.

I liken that   lifestyle to trying to navigate through a maze and becoming paralyzed by indecision about whether to turn left, or right, at a certain juncture, without realizing that I could scale the wall and climb out of the whole structure; just walk along the tops of the walls taking the shortest distance out...

My apologies for   the size of the text in the post; I'm still tweeking my Python3 script that pretties up these posts. I'm still trying to get it to randomly select pastel colors for each paragraph. The hard part is writing the function so it doesn't randomly choose the same exact color for consecutive paragraphs. I tried using an "inverse" approach, so that the next one would be the inverse color -like yellow is the inverse of purple, or gray the inverse of green or whatever it is (you have to stare at like an orange object then close your eyes to see its inverse in the after image, blue, I believe is what your orange would look like with your eyes closed).

But this had   the unwanted side effect of inverting the colors visibility against my almost black background, chosen out of Blogger's "theme"s for post backgrounds. A nice bright pastel yellow would be followed by an almost invisible purple, type of thing.

Making it so   that capitalized words would be bold-faced became another challenge when I realized that the first word in every sentence is capitalized, according to convention -unless you are e.e. cummings or something...

So, it was:   bold-face every capital word, unless it's the very first word of the whole document; or it is preceded by a period (or single or double exclamation mark or anything else I've used over the past 20 years here, to end sentences with...

I've made a   few tweaks and will now send this through the mangle. Maybe put a Capitalized Word or Three here to see if it renders OK...

I'm still not   out of the woods, so to speak, because a typo, such as accidentally ending a sentence with a "#," or something, has the potential to crash the whole script. And to think those were the kind of things that dissuaded me from continuing the pursuit of a career in computer programming, back in the 1980's...

Now comes the   test# The first word of this sentence should NOT be bold-face; but probably is...

I've been on   the sardine diet for 7 days, now, and have a lot less anxiety and no depression upon waking (and realizing that life sucks and then you die, type of thing...)

You have just read 490 words

No comments:

Post a Comment

Comments, to me are like deflated balloons with notes tied to them, found on my back porch in the morning...