The Public Library Service here in Prince Edward Island has self-checkout machines in some branches: touch screens with barcode scanners that allow patrons to check books out themselves, similar to self-checkout machines in grocery stores. The machines come from D-Tech, and when you opt for an emailed receipt from at the end of your session, you receive an email like this from notifications@d-techinternational.com:
PEI Public Library Service
Self Service Receipt for Borrowed Items
Name: **********5366
Title
COVID chronicles : a comics anthology
Item ID
33392010658484
Due Back
8/10/2022
***************************
Date: 17/09/2022 4:41:31 PM
Thank you for visiting the Library!
To automatically parse this email and create macOS Reminders for each item, I wrote this AppleScript:
using terms from application "Mail"
on perform mail action with messages caughtMessages for rule catchingRule
repeat with caughtMessage in caughtMessages
try
-- Get the body text of the email message
set receipt to content of caughtMessage
-- Split the body text into individual lines
set theLinesList to paragraphs of receipt
-- Loop through each of the lines in the body text
repeat with a from 1 to length of theLinesList
-- Get the current line
set theCurrentListItem to item a of theLinesList
-- If the current line is "Title" then...
if theCurrentListItem as string is equal to "Title" then
-- The actual title of the book is the next line, so store this
set theTitle to item (a + 1) of theLinesList
-- If the title is not empty then...
if theTitle as string is not equal to "" then
-- The date due is 7 lines later in the body of the email
set theDateDue to item (a + 7) of theLinesList
-- Re-format the date from D/M/Y to M/D/Y
set command to "date -j -f '%d/%m/%Y' " & theDateDue & " +'%m/%d/%Y'"
set theFormattedDate to do shell script (command as rich text)
-- Create a reminder in the "Project" list of the Reminders app
tell application "Reminders"
set mylist to list "Projects"
make new reminder at end with properties {name:"'" & theTitle & "' is due", allday due date:date theFormattedDate}
-- Say the title out loud!
say theTitle
end tell
end if
end if
end repeat
end try
end repeat
end perform mail action with messages
end using terms from
This script looks for every book in the incoming email, grabs the title and the date due, and creates a reminder.
To connect it to Mail.app, save the script in /Users/peter/Library/Application Scripts/com.apple.mail/LibraryDateDueReminders.scpt.
Finally, create a new Mail.app Rule that looks for incoming email from notifications@d-techinternational.com and passes each email that matches to the AppleScript:
From this point, whenever a new email arrives from the self-checkout machine, a new reminder will be created. Like this one:
I am very much a home cook when it comes to AppleScript: most scripts I write by Googling things like “date conversion in AppleScript” and “parsing strings in AppleScript.” It’s forever a language just on the edge of my ability to perceive it logically; it’s “human-like” syntax always seems like more a hindrance than a help. But it’s also a powerful Swiss Army knife of amazement if you’re willing to put the time in to figure it out every time anew.
My old friend and former Home and School colleague Heather Mullen is running for school trustee in Charlottetown:
Today I went outside my comfort zone to become a candidate for a public election. I did this because the public education system in PEl is very important to me. I will be running in the Charlottetown area (I moved to town this spring) however my time with PEI Home and School Federation has taught me the importance of representing the needs of students, schools, and staff across PEl and I will continue to listen to those concerns. I hope wherever you live in PEI, you would consider being involved in the Public Schools Branch election, either as a candidate or by voting.
Heather is a dynamo: smart, progressive, organized, compassionate. She took the school food program baton handed to her when she became President of the PEI Home and School Federation and, with enormous dedication, expenditure of her own time, and deftly building a focused team of others, took it to the finish line.
I’ve every confidence she’ll take the same energy and passion to her role as school trustee.
The process for voting in this election is more involved than you might expect it to be: all electors need to apply for a mail-in ballot before October 9, 2022. It’s not difficult and will only take a moment. It’s worth it to ensure we have a school board with a strong mandate.
After generations of market-goers squeezing down the stairs from the loading dock, risking banging heads into the open window to the men’s washroom, they’ve moved the stairs to the other side!
Over the last 20+ years, Olivia and I have spent a lot of hours perched right there, eating our smoked salmon bagels.
![](/sites/ruk.ca/files/styles/wide/public/sound/they_moved_the_stairs__1.jpg?itok=eMdkdSpb)
Patrick Rhone, on being handy:
When it comes to technology, my knowledge largely comes from my lack of fear over trying new things and pressing buttons just to see what they do. My consulting clients ask me where I learned how fix that thing that they called me in for – even if I may not have encountered their specific issue before. I explain that the main thing is my lack of fear. That I’m willing to just try things to see if I can figure it out. Push buttons just to see what they do. And, in doing so, I can now fix that problem should I ever encounter it again.
If I have an employable skill, it is that.
From Holo:
The Cyanometer by Martin Bricelj Baraga is a monument to the blueness of the sky. It is inspired by the original cyanometer invented by Horace-Bénédict de Saussure in 1789. The Cyanometer is both a monument and software that periodically collects images of the sky.
While Apple Wallet doesn’t offer a native way to add a PEI library card—nor, indeed, anything other that credit, debit, and transit cards—the brilliant little free Pass4Wallet app can do it.
Just add a “Store” card, type your library card number (the app won’t scan the bar code), select type Codabar, and tap Add to Wallet.
I spent the better part of the afternoon at the Charlottetown Library. Some new things I learned:
- The Shed, the in-house coffee shop, serves something called a “Saigon Dirty,” which is: two shots of espresso, condensed milk, cardamom syrup, over ice. It’s a nice departure from the everyday coffee.
- Go to the librarian pod at the back of the library, show your library card, and they will hand you an Xbox controller, headphones, TV remote, and an Xbox game or two of your choice; walk over to the nearby Game Room and go wild. Why this isn’t completely filled all the time, I do not know. I played a good 30 minutes of Super Monkey Ball.
- The wifi, although it requires passing through an every-time-you-connect annoying disclaimer, is well-implemented, very fast, and works everywhere in the building and on its patios.
- There are a lot of well-curated collections of books on stands surrounding the main librarian pod; I’ve found myself borrowing from them almost exclusively.
- A photo on your phone of your library card barcode scans just as well as the card itself.
![](/sites/ruk.ca/files/styles/wide/public/field/image/9b8940cd-9c72-43ab-90fc-6d9c626a2839.jpeg?itok=XBHljLwN)
![](/sites/ruk.ca/files/styles/wide/public/field/image/73357385-b585-4991-8941-e73d4644a4ef.jpeg?itok=SY2ds0l2)
Eleven years ago I brought my car to Dave’s Service Centre for the first time.
The garage was on St. Peters Road back then, in a building long-since-demolished.
A year or two after that first visit—Dave had become my regular mechanic by that time—Dorothy joined him, running the front-of-house. Indeed, the move from St. Peter’s Road down to Belmont Street was precipitated by Dorthy’s insistence they find new space, after a concrete chunk of that original building fell off; she found the space on Belmont on Kijiji that same afternoon.
Dave and Dorothy helped me keep my 2000 VW Jetta on the road for almost 20 years. Every year that the Jetta carried on, we celebrated; it became a joint project to see how long we could keep it on the road.
When I purchased an electric car in 2019, I was afraid that I’d have to go elsewhere for service. But it turns out that the Kia Soul EV, mechanically, outside of the engine, is just a regular old Kia Soul. So I continue to take it to Dave and Dorothy for brakes, winter tires, yearly inspection.
This summer, as I was picking up my car after a brake job, and chatting with Dave and Dorothy, as I often do, Dorothy mentioned that they were getting married this weekend.
When I took Lisa‘s car back a few weeks later, Dorothy gave me an invitation to the wedding reception.
Dave and Dorothy are exceptional people: kind, honest, resourceful, good at explaining complicated things. They’re good businesspeople because they care about building long term relationships with their customers; it comes naturally to them.
So, of course, Lisa and I went to their wedding reception last night, down at the Merchantman. It was a great do: good food, friendly people, and a lot of love for Dorothy and Dave.
This being PEI, it turns out that Lisa and Dorothy are cousins, through the Uigg and Vernon River MacLeods. There was much family-connection-making, and I felt like I’d unlocked a new level of Islanderhood by simple proximity.
Congratulations to Dave and Dorothy on their wedding. I’ll be in for my MVI in a few weeks.
The airport at Barra, Scotland uses runways in the beach:
The beach is set out with three runways in a triangle, marked by permanent wooden poles at their ends, in directions 07/25, 11/29, 15/33. This almost always allows the Twin Otters that serve the airport to land into the wind. At high tide these runways are under the sea; flight times vary with the tide. Emergency flights occasionally operate at night from the airport, with vehicle lights used to illuminate the runway and reflective strips laid on to the beach.
(via this entertaining video about visiting Britain’s westernmost bus stop)
The Centennial group of car dealers sponsored a night at the drive-in, and Nissan Rogue-driving Lisa was invited.
Which Is how both L’s, Mike, Karen, and I ended up watching Cool Runnings under moonlit skies in Brackley tonight.
L-the-younger, who, at 11, had never been to the drive-in before, conjured up an implausible seating solution that involved an open hatchback and a lot of pillows. But it mostly worked. We ate an ungodly amount of unhealthy food. A good time was had by all.
![](/sites/ruk.ca/files/styles/wide/public/sound/cool_runnings_1.jpg?itok=RrE7IBVr)