[Semibug] Piping, redirection and shellscipts: 3/5/2025 7pm Eastern Standard time
Steve Litt
slitt at troubleshooters.com
Wed Mar 5 08:55:54 EST 2025
Ron said on Tue, 4 Mar 2025 15:45:16 -0800
>Steve Litt wrote on 2025-03-03 14:55:
>
>> A Yaml file is human readable text.
>
>Yeah, but it's not structured for sorting is the point.
>
>Make YAML from sorted data, don't sort YAML.
Isn't this just an implementation detail? There's no practical
difference: Maybe a few extra milliseconds. If I didn't sort the Yaml
itself, I'd need to:
* Grab the Yaml keys
* For key in keys
- Find Yaml record
- Write it to the new sorted file
There's no way I could have delayed making the Yaml file until after I
had all the domain data in place.
But anyway, it's just an implementation detail.
>
>
>
>> Because the registrars don't give you a nice JSON view of all your
>> domains
>
>Some of them give API access, but granted, not all of them.
And I would have spent more time with their API access than the 1
minute it took to screen-scrape and massage with Vim.
>> What alternative would be more straightforward?
>
>If I have a list of domains, I'd also store prices and descriptions
>with them, so I would just manually put them in a text file.
That's exactly what the Yaml file is. Plus it contains the amount I
bought the domain for, the date I bought it, and the price of the next
renewal for many of the later records. So I can use it to handle my
taxes too.
>Maybe a postgresql database.
Where? On my personal desktop? On my nice, clean web page that until
very recently I intended to keep Javascript free?
>Since ⅔ of the fields mentioned (as used in your own list of domains)
>require manual data entry (pricing, descriptions), it gives a good base
>to start with and one can avoid sorting YAML, diff'ing, etc.
Manual data entry is much faster in Vim than using psql, and of course
I wasn't about to write an application to input the data to Postgres.
Yaml is more human readable, it's smaller and easier to back up, and it
doesn't require a database to access.
And my use of the 50 year old diff program to do something not usually
thought of as a job diff does was brilliant. It would have taken me a
half day to code it, because my DP101 days are 40 years in the past and
I've forgotten such algorithms.
>If the quantity were too large for manual initialization, then use a
>registrar with an API (which still needs manual addition of pricing
>and descriptions).
Wait a minute. Now I'm supposed to pick my registrar based on API
rather than price, breadth of TLD choices, trustability, reliability,
ease of use and terms of service, choice of whether I want to have my
personal contact info in whois, and a whole host of other business
factors? Just to stop using Yaml? That just doesn't make business
sense.
And did I mention that this whole thing was a one-off task which I
hadn't even thought out? To quote the late, great Phil Barnett:
"While it would be nice to spend days figuring it out, I spent minutes
and got past it."
SteveT
Steve Litt
http://444domains.com
More information about the Semibug
mailing list