Grab My Books — Ebook from WebSite, Not Just WebPage

Not 100% what I was hoping for, but pretty good, especially for the price.

There are several (too many) blogs that I want to read from the start. Currently, I have the index bookmarked on my PlayBook. When I want to read something, I open that bookmark, scan upwards until I see the next entry I haven’t read, and open it. And wait while it opens. Then go back to the index and repeat. Some blogs have “next” tabs, which makes it easier, but many don’t.

Grab My Book is a FireFox addon. It’s a bit clunky, but works.

Open the index and one a typical page. Open the rules editor to make sure it interprets that blog correctly. Move the mouse around until the right parts have the box. Click OK (or something like that) and save the rule.

Then, and this is the painful part, open every tab. Middle-click on each one, in order. (I was hoping to avoid this step, but no luck.)

Grab Tabs.

My Book.

Grab My Book.

Done!

I was hoping for something like a Plucker Distiller, but all the websites for that were from 2006 or older. I liked Plucker. I could tell it how deep to follow the links, give it a few rules, and a few minutes later I had an ebook on my Palm.

I tried Download Them All [1] and then Calibre to convert to ebook, but unfortunately the links don’t interconnect. It’s theoretically easy enough to create a simple html index page that links to them all, that I could send Calibre, but in reality there’s a lot of typing.

[1] Download Them All is aFirefox addon that lists all the links from a page, with nice sorting and filtering, then downloads the ones you check).

Now off to read my new books!

Python Programming — Nostalgia First

This series will review several Python programming books, but let me enjoy some nostalgia first.

I’m self-taught, and my programs only have error checking if it’s faster to do that than restart if I make a typo when using them. My husband, with 20 years in the business, laughs at my little programs and, after I work at something for hours, can find the problem in minutes.

My first language was AppleSoft BASIC, from the books that came with the Apple II. I was 13. The graphics mode and game paddle were built into the language, so immediately after counting from one to ten I made a ball cross the screen, in two dimensions, and made the ball move when I moved the paddle. I wrote a program of several hundred lines to keep track of my Pathfinder (Girl Guide) badge progress. My advanced math class learned matrices as an extra, and the teacher asked me to teach the class about multiplying matrices with a computer program.

Dad thought I was getting cocky, so he introduced me to FORTH. Its lack of a GOTO floored me, even though I’d avoided spaghetti code. I still miss FORTH’s BEGIN-WHILE-REPEAT loop, which exits in the middle. (Modern languages’ ‘while True’ still distracts me.) Stack arithmetic was an eye-opener. (Yes, I later bought an HP calculator.)

I learned more from the AppleSoft BASIC book and the second chapter of a Pascal book from the library than I did in two high school courses in the 80s, which were supposed to teach me BASIC, FORTRAN and Pascal. Well, I did learn another operating system (CP/M) and how to debug classmates’ code. The final assignment of analyzing a paragraph in several ways was a nice challenge. I was the only student to complete the assignment. The teacher was temporarily confused by a variable that said whether to print to the printer (for the final submission) or a file (for debugging) and the option to run through each analysis method in order rather than sit at the computer and enter each choice one at a time.

My first university work-term was to write a FORTRAN program to analyze Xray crystallography data. I learned FORTRAN from DEC manuals. Next term had a required programming course. A classmate reached the end of the course without learning that a FORTRAN math program needs four sections: housekeeping, data input, data manipulation, and data output. The only things I learned in that course were the differences between work’s computer and the school’s, five ways to find root-finding algorithms, and two sorting methods.

When I got a Mac in my sophomore year, I also got LightSpeed Pascal, which included a tutorial on Pascal and event-loop programming, and some advanced Mac programming books. I confused the Process Control TA (who later sat down and learned) by using an event loop in my BASIC program to monitor and control the unit’s feedback loop.

The guy I liked was a programmer, so I asked to borrow a Pascal book. He finally married me to get it back. He’s amused at my pitiful attempts, especially when I spend hours searching for a bug he finds in seconds.

I almost had a cribbage program in Pascal working on the Mac. I did a few reports on VGA Planets data sets in C++ (part of my husband’s program to help him make turn files). A few years later I learned a bit of PHP to configure my website. (I use PmWiki.)

But none of the later languages had the simple joy of AppleSoft BASIC.

My husband likes Python for quick utilities and wrote some for me, but I got frustrated with asking him for every “small change”. So, with the help of the online documentation and a working program to start from, I learned Python (for a small value of “learned”). (If anyone wants to insert ssml delay tags in txt files so a speech-to-text reader will read at a specific, slow wpm for shorthand practise, including calibration, let me know.)

Python has almost all the features I missed from AppleSoft. It has a command-line interpreter so you can do something neat before using a program file. There’s no compile / link cycle. PyGame gives it a simple graphics interface. It runs quickly and has a decent debugger (though not as nice as C++). There’s a bit more housekeeping than with AppleSoft, but it’s only a few lines.

All this had me thinking about my 12-year-old son. It’s time he learned. (Yes, I messed up by being enthusiastic, sigh. I used to catch Dad’s enthusiasm, but my son isn’t like me.)

For all the kids’ books, you should be in the next room. Sometimes an extra eye when debugging can be the difference between frustration and accomplishment. Also, you should quietly work through the first chapter or two yourself to catch differences in your installation.

My plan is to review the following books: Invent Your Own Games with Python, Livewires, Snake Wrangling for Kids, Dive Into Python, Introduction to Programming at Pasteur.fr, and the tutorial that comes with the language.

Postcards@hallmark.com warning

I just received an email claiming to be from postcards@hallmark.com , with an attachment.

Yes, my anti-virus program found a nasty in the attachment.

This is a reminder: It is very easy to put a “return address” sticker one email. I’ve done it myself. I use it to send “thank you for your comment” messages from “website@onebit.ca”. I know of three very different ways to do it.

To repeat: Just because it says, “From Hallmark” doesn’t mean it really is.

Tip of the Day — Print Vista Directory Listing

There are times I want to list a directory on paper, or at least in a plain old text document. The most recent was this morning while I was trying to organize my backlog of podcasts.

And, finally, it all came together, enough of the correct words that Google was able to help find the rest.

This works for Vista. The original method worked on DOS. I’m sure a variant or combination of the two will work on any OS in between.

Vista:

Short answer, for people who used PCs back in the early 1990s:

Start / Run... cmd
dir | clip
"paste"
into text editor.

Long answer:

Start / Run...
That brings up a dialogue saying to type the name of a program, etc., for Windows to open.

cmd [enter]
Type the letters “cmd”, then the enter key. This opens the command prompt, which back in 1991 was the way we talked to PCs.

Navigate around until you’re in the right directory. You do this by typing in commands. Moving the mouse won’t help.

cd is “change directory”
cd abc is “change to the abc directory”
cd / is “change directory, go to root”
cd .. is “change directory, go up one level”

Then:
Open a text editor or Word, so you have a place to paste the text that’s about to be hidden on your clipboard.

Back in the command line window,
dir | clip
Back to the text editor:
/edit / paste (or ctrl-V)

Explanation: The | is a “pipe” command, meaning take the output from the DIR command and put it into the device CLIP, which is the clipboard. There used to be a device PRN, so you could pipe it to the print queue, but Vista doesn’t recognize that.

There you have it. Enjoy!

Recursive Backups and the Reluctant Writer

Hello, my name is Cricket, and I’m a packrat.

I also can’t work in the middle of a mess.

The next chapter of my novel (no, don’t ask, it’s a long story) is due at the end of the month. (Or a week later if I’m willing to pay for rush shipping.)

This novel has been in progress since November 2002. I know that for certain because I have the very first draft of the very first scene I wrote for it. It’s going to be somewhere in the middle of the story, unless it fell victim to “Find your very favourite scene and delete it.”

When I write, I’m terrified I’ll make something worse. So, the first thing I do is make a copy, with a sequential number. I then work on the newest file.

Sometimes I split a file out, to save something I need to cut and can’t bear to part with.

Sometimes I make a full backup of all my documents, by date. File1 will be in the first backup. Files 1 through 10 will be in the second backup. You get the picture.

Sometimes my husband makes a full backup.

If in doubt, we make even more backups.

This fall, when I moved to the new laptop, Husband just copied everything from the old one into a folder on the new one. I think he left out programs that he knew would be re-installed, but he left everything else.

So, I have the current “My Documents”. That’s pretty well organized.

Then I have “old_machine-2008-08-21”. That’s not under My Documents, since I don’t need to back it up yet again.

In that file, I have
/backups/documents&settings/my_documents.

This is from the backup program on the old computer, including My Documents. It contains one copy of all my writing. I think.

It also contains an old folder for Shared Documents, which contains Data, which has another copy.

Then there four zip files, taken maybe twice a year, back when we had to zip things and burn them to a CD for backups when we traveled. Each of them has both My Documents and Data.

I just spent two hours finding everything to do with my novel, moving them to the desktop, then dealing with the duplicates.

Yes, I like the fact that Windows can now read handle files within zip files just like regular files, so I can explore, copy and delete them without extracting them first.

And, yes, I have “backup as of this date” and “zip of backup this date”.

Very frustrating. No, I’m not comfortable assuming the contents of identically named folders from two different backups are the same except for the newer files. I opened each folder, copy the contents to a central location. No, Vista is not smart enough to actually compare the two files. It says “A is newer than B. What do you want me to do?” It asked me about ten times for each of 100 files.

Maybe tomorrow I’ll actually start to read some of the notes. I hope to start writing early next week.

%d bloggers like this: