Categories
Tech

Installing pyinstapaper on Mac OS

lxml 4.0 doesn’t build on Mac OS Mojave. But the latest version does. Unfortunately pyinstapaper looks for 4.0 when it builds.

I would have never figured this out but another developer submitted a merge request that noted the lxml issue.

The request hasn’t been accepted yet so if you try to install pyinstapaper using pip it will error out. That said, you can still install pyinstapaper from source (assumes you have jumped through all of the ‘brew install $foo’ requirements stuff) to get python 3.x running on your Mac.

To get pyinstapaper to install:

  • Download the the code for this module as a zip file.
  • Extract zip.
  • Edit the setup.py file and change  the line that reads:
  • ‘lxml>=3.4,<=4’, to ‘lxml>=3.4,<=5’,
  • save the change and then from within the directory that you downloaded the source run
    ‘python setup.py install’ and you should be good to go.
Categories
Automation Post Tech

Adding todos to Today list in Things using AppleScript

Really pulled my hair out for a while on this issue so hoping to help someone out here.

set newToDo to make new to do ¬
		with properties {name:CurrentTodo} at beginning of list "Today"

This, despite the Cultured Code documentation using Today as an example list in the AppleScript guide.

So, if you use that code and replace “Today” with “Someday” it works like a champ but if you pass it the list “Today” the todo item is created in the Inbox and not the Today area of Things. Weird and it was making me crazy.

Anyway, the easy solution is:

set newToDo to make new to do ¬
		with properties {name:CurrentTodo, due date:current date} 
Categories
Post Tech

Shortcut: Day One braindump to Things

I use Day One as a journal almost every day. Most mornings start with me doing a bit of a brain dump into Day One, listing anything that’s on my radar that I need to deal with.

So I wrote a shortcut to help me deal with those brain dumps a bit better.

This shortcut:

– takes a list of items from the clipboard (so, I would just select/copy the list in Day One) and creates entries in Things (my todo list app of choice for the past many years).

– With a bit of a rub: if the tasks contains the word “today” (e.g. I need to call Joe today) the shortcut puts the task in the Today section of Things instead of in the Inbox section.

Admittedly this is not really wizardry level stuff here and the inability to run a similar procedure on my Mac (shortcuts only working on iOS I mean) limits its use a bit. But anyway, for anyone running Day One on iOS who is interested, here’s the shortcut I use to extract a brain dump from Day One and load the tasks into Things.

Categories
Post Tech

Could Competition from Private Equity Make Kindle Suck Less?

I received a Kindle for Christmas. I love it despite the fact that it feels like Amazon has done little if anything to advance the technology of the ebook reader in the 10 years that have passed since I bought my wife her first Kindle 2.

Highlighting passages in an ebook on a Kindle still feels janky and broken. The interface, or lack thereof, forces users to hunt and peck around the screen with a fingertip, making wild guesses about what effect various taps will have.

Much smarter people than I have thought hard about how much better ebook reading could be. Craig Mod is one of those people and has written about this on Medium and his personal site.

That said, receiving the Kindle for Christmas motivated me to dig out my Princeton University library login and see what kind of books were available on loan for me to read.

Some background: This was not my first attempt at borrowing digital materials from the library. A few months ago I tried borrowing an audiobook from the PU library and was prompted to download an application on my iPhone called Overdrive to search and borrow materials.

The Overdrive experience was awful.

So bad in fact that I immediately shelled out $15/month to audible.com even though the user experience there is only a bit less tedious.

No doubt part of the friction with my first attempts using the Overdrive application to borrow digital materials from the library was having to jump through Princeton’s dual-factor authentication to validate that I could borrow materials.

As I switched back and forth from the Overdrive app to Safari, back to Overdrive, my inner-coder could sense just how precarious and failure-prone this authentication process would be.

This is all to say that I didn’t have very high hopes when on the day after Christmas I grabbed a completely unnecessary plate of Christmas cookies and fired up my iPad to see what ebooks might be available for me to borrow from the library to read on my new Kindle.

This time though instead of using the Overdrive app to access the library’s materials, I was promted to download an app called Libby.

Libby is a much better version of the original Overdrive. More polish, less janky. Moreover, it did two things straightaway that indicated it had been completely rewritten from the ground up:

  • it handled the two factor authentication without a hiccup. Library authentication was dumbfoundingly easy and very elegantly integrated into the Libby app. Morevoer, Libby seems to handle multiple libraries with ease.
  • the app asked me right out of the gate if I wanted to read ebooks that I’ve borrowed in the app or on my Kindle. It handled the Kindle integration with ease as well.

With Libby the friction of borrowing ebooks from the library is barely any more difficult than purchasing an ebook from the Kindle store. [note: When I read something (physical, digital) from a library and I really enjoy it I will in most cases purchase the hardcover version of the book for my bookshelf. Both to support the author and to give me some visual cues of what I’ve read. That’s just me. Judgement-free zone here.]

I get that borrowing digital materials from the library comes with its own bag of problems around revenue and timing of book sales (publishers now delay making digital versions of their books available to libraries for a few weeks after the hardcover hits to avoid cannibalizing sales, etc.). Throughout my career I’ve worked with libraries in various capacities and experience has taught me that on the whole, librarians are both passionate and vigilant.

So, when private equity behemoth KKR announced their purchase of Overdrive from Rakuten at 6:30pm on Christmas Eve there was a bit of a stir on twitter about how this spelled the end for Overdrive and its swell Libby application:

Twitter has me thinking that librarians, who may be our most vocal ambassadors of a freely available commons of knowledge and information, don’t seem to have a lot of love for the folks in private equity. In particular a lot of angst seemed to stem from KKR’s acquisition and dissolving of Toys R Us and there appears to be some expectation that they’ll do the same with Overdrive.

BoingBoing.net’s Cory Doctorow seems to take a similar view with his coverage of the acquisition noting KKR’s model here is:

to buy profitable, productive companies, load them up with debt (paying themselves out of the money that was borrowed), cut costs by slashing wages and degrading the quality of their products and services, then allowing the company to go bust, stiffing the creditors, workers, and suppliers (that is, libraries, publishers and writers).

I am a fan of BoingBoing as well as Doctorow’s fiction but something wasn’t sitting right with the way this acquisition was being portrayed. So I did some Googling and found a few interesting facts about KKR:

  • First off, while I’m sure many Toys R Us employees would have preferred to have kept their jobs instead of seeing their employer go under, KKR and Bain put up $20mil as severance pay for Toys R Us employees who were let go. I thought that was interesting and somewhat overlooked in the Twitter rage-fest about KKR’s evils.
  • Secondly, why buy such a strange, niche company/product as Overdrive/Libby just to drain revenue? Where is the revenue? Did I miss something about the cash cow lurking in libraries and digital media? So then I discovered that KKR has also recently acquired RBMedia, an audiobook publisher that also owns audiobooks.com and RBDigital.
  • Thirdly, I read this paragraph in a Forbes piece on KKR (the whole article is worth reading):

According to Kravis [one of the K’s in KKR], Japan is littered with cheaply priced conglomerates loaded with underperforming assets. He recalls asking the CEO of one of Japan’s big trading companies how many subsidiaries the company owned. The Japanese executive said 2,000. When Kravis asked how many were core, the answer was still 2,000 . .
“I’ve been going to Japan since 1978. I always saw the light at the end of the tunnel. Now it’s real,” Kravis says with a youthful glint in his eye. Roberts adds, “Japan today reminds me of the 1960s and 1970s in the United States.”

Taking these three points together (Rakuten is, of course, a Japanese company with a bunch of subsidiaries) seems to me like KKR may actually have some kind of strategy here to integrate these disparate acquisitions. Maybe they want to make money the old-fashioned way by building something that makes it easier/better to borrow digital materials from the library than what currently exists in the market? Who knows?

All that said, this whole thing would have been way more interesting if KKR had purchased Rakuten’s Kobo (ebook) subsidiary.

I don’t know enough about libraries to know who KKR is competing with as it (hopefully) builds out its Libby/audiobook.com/RBDigital integration. But I do know that it they buy Rakuten’s Kobo subsidiary they may have enough resources to wake Amazon from the complacency that has allowed the flaws in the Kindle to exist for so long. Maybe Overdrive was just the first bite at the apple? Who knows. But in contrast to most of the hot takes on Twitter, I’m skeptical that KKR purchased Overdrive just wring out revenue and shut it down.

Categories
HowTo Tech

Troubleshooting PDF OCR using Python on Mac

I wrote a script to extract some text from a PDF (image-based text, so pdftotext wouldn’t work).

Using pdf2image convert_from_path I simply could not get any data out of the pdf. I tried multiple PDFs while testing and convert_from_path just kept returning an empty variable.

Turned out that my homebrew install of xpdf was interfering with my homebrew install of poppler.

Uninstalling xpdf (brew uninstall xpdf) and reinstalling poppler (brew install poppler) seemed to fix things up. My suspicion is that they both come with their own versions of pdfinfo which is used by pdf2image. Just a hunch, I don’t know enough about what’s going on under the hood. So, anyway, if pdf2image isn’t working correctly for you and you’re on a Mac, make sure you’ve got poppler installed and that xpdf’s pdfinfo isn’t being used.

Categories
Post Tech

Essential Mac Apps – 2019 edition

This week I’ve been building up my new iMac from a base-install of Mojave. I have a text file that lists all of the apps that I had installed on my dead MacBook Pro (and, good backups, thankfully), but instead of just reinstalling all of the apps I had, in the spirit of Cal Newport’s Digital Minimalism, I’m just installing the apps that are essential to my intentional use. We will see how this goes!

Here’s what I’ve got so far as apps that are absolutely essential for me:

  • Things – best todo list manager ever. Installed on and syncs with all of my iOS devices.
  • DayOne – best journal application ever. Installed on and syncs with all of my iOS devices.
  • Reeder – my RSS Reader of choice. Linked to a Feedly account (but only because that was the free/easy migration path from Google’s RSS days)
  • Byword – my Markdown/editor for the past year or so. I use this on the desktop and iA Writer on my iOS devices. Both editors read from the same iCloud folders.
  • Spark – returning to this email client because I can never get the default Mail.app to mirror what is going on in my Google Inbox in any relevant, useful way. My fault probably, but I’m tried of futzing with it and Spark, generally, just works.
  • MarsEdit – where I write/edit weblog stuff. Though, notably, my first drafts usually go in Byword or iA Writer depending on what device I’m working on.
  • Pixlemator – been using this forever. you never know when you need some layer-based image manipulation.
  • TextMate – No idea why/how this ended up as my programming tool of choice but I can not remember ever not using it. Always been very happy with its syntax highlighting regardless of what language I’m in.

When I’m remotely working for Princeton University Press:

  • MS Office 365 (Mac versions, including Outlook for mail)
  • Teams, thankfully, runs on my iOS devices, so I don’t really ever have to spend too much time in Windows, but when I do there’s . . .
  • Parallels with . . .
  • SQL Server Management Studio because I need a SQL client.

Sort-of essential/system utilities stuff that I’ve installed in addition to my “essential” apps:

  • Spotify
  • Backblaze (offsite backup for all the Macs in my house)
  • iStat Menus (nerdy, probably unnecessary)
  • Mosaic (nerdy, necessary)
  • SuperDuper (for my local backups. Easiest most-bulletproof backups ever)
  • Alfred (new to me but needed text expansion and a better Spotify interface, so. . . ) and the Alfred Spotify Mini Player
  • Linen background from Initial Charge