Archive for category Authoring

Colored reports for text and HTML in Python

One of the things that I face regularly is report generation. Often they’re free form, by which I mean not tables full of tabulated data.

Output from my htmlAnsii() class

Output from my .htmlAnsii() class

Just “is this ok, is that ok, 27 of the other happened”, that sort of thing. I like to use color — green if everything is ok, red if it isn’t and so on.

I’m often out where I want the report in a web browser. But then again, I’m often at my desk, signed in to a console and I want it there. The environments couldn’t be much more different; HTML tags on the one hand, within the wrapper of a page, and ANSII escape sequences on the other. And they’re both kind of annoying and error-prone to write out explicitly, especially when you’re doing it a lot.

What to do?
Read the rest of this entry »

Tags: , , , , , , , , , ,

Online Docs for SdrDx

I am pleased to introduce online documentation for SdrDx. This marks a sea change, where we move from a text file, buried in the distribution, to a system where everyone is looking at the same document, one that is easier to read, to look at and in general to deal with. It includes a table of contents, an index, visual cues for user interface elements and so on.

The link is on the SdrDx page, and the next release of SdrDx will take you there directly.

Comments and corrections are welcome, of course.

Tags: , , , , ,


atAw, man, I got this… this… coding problem. I keep finding myself writing things that only I would have a use for. So on my iPad, I found this App called “Emerald Observatory”, and I was so, so impressed. First, it’s pretty. Really pretty. Second, it’s full of astronomical data, useful stuff. And I thought to myself, wow… I really like some of this.

Then (oh, no…) I began to think about what parts of it I would like to use, that is, have directly available to me. So I wrote those nice folks, complementing them sincerely on what a nice App they had come up with (check it out, you won’t regret it), and suggesting they write what I had in mind, because actually, they sort of had the data in the app already, it was just a matter of organizing it differently. I got a nice reply, thanking me for the suggestion, but allowing as to how they had a lot to do, and so it would be “on their list.”

Read the rest of this entry »

Tags: , , , , , , , , , ,

Publishers and the E-book Ecosphere

leap-pubIn e-tech, publishers look to be an obsolescent cog. They exist(ed?) with books in a legitimate role because someone needs to take on the cost of printing a physical book, shipping it to a store, etc., and your typical author can’t afford to do that. With an e-book, the costs – such as they are – are handled by the retailer (Apple, Amazon, smaller sellers – even the author.)

Speaking as someone somewhat familiar with the industry, publishers, long known for providing only minimal advances and the smallest possible royalty to the actual artist (the author(s) and illustrator(s)), appear to have no role in the e-book ecosphere.
Read the rest of this entry »

Tags: , , , , , , , , , , , , ,

Google Base

Recently, I’ve had an opportunity to help a friend utilize Google Base.

I searched for Traxxas Slash; these are web results (and an ad.) To use Base, I'll click the link I've circled at the top in red.

I searched for Traxxas Slash; these are web results (and an ad.) To use Base, I'll click the link I've circled at the top in red.

Base is Google’s attempt to offer a database listing of as many products as humanly (machinely?) possible, with the objective of getting you to use it to find things, and while doing so, be further exposed to ads from their core business. My friend, feeling that this was a marketing opportunity presently unaddressed, was very interested, and understandably so. Base is what you get when you click the “Shopping” button at the top of a normal Google search page.

I agreed to write the code necessary to create the file that packages his inventory (over 30,000 items) for Base, do the uploading, and generally handle the process for him. What could go wrong? It’s Google, right? A company with enormous respect from the technical community, a huge web presence, and a mantra of “do no wrong.” Well. That’s what makes this worth writing about.

I didn’t think it would take a lot of time to implement as I wrote his entire e-commerce system for him and was familiar with the lay of the land, as it were, and in that, at least, I was right. Base is very easy to integrate with; using Python, it only took me a few hours to be able to generate the required data file to Google’s specifications. Uploading the resulting data file to Google is trivial. But… unfortunately, Base has many problems that go far beyond just uploading a correct data file to the system.
Read the rest of this entry »