Batch delete all email from IMAP Inbox in iOS #

Some email services (Spectrum/TWC/Road Runner, Yahoo!, etc.) allow forwarding but not automatic deletion of forwarded email, leading to potential quota exceedance over time.

This slightly-modified* Python script by codersofthedark can be scheduled or run manually to batch delete all messages in the Inbox:

#!/usr/bin/env python
import imaplib
box = imaplib.IMAP4_SSL('imap.example.com', 993)
box.login("user@example.com","password")
box.select('Inbox')
typ, data = box.search(None, 'ALL')
for num in data[0].split():
   box.store(num, '+FLAGS', '\\Deleted')
box.expunge()
box.close()
box.logout()

Under iOS, use a-Shell (App Store | GitHub) to edit and save the script (e.g., "emptyinbox") in vim, then set as executable (chmod +x ./emptyinbox). Run simply as emptyinbox or pair with Shortcuts (specifying the full path, /private/var/mobile/Containers/Data/Application/long-string/Documents/emptyinbox) and add an icon to the Home screen via the Action icon.

* Added the shebang, corrected a typo, and genericized domain names.

/misc | Jul 03, 2020

Fix the paper feed roller on Brother MPrint MW series mobile printers #

In almost a decade and a half of using Brother MPrint MW series mobile printers, the only problem I've had is with the paper feed roller (aka the "pick-up roller"), which generally stops feeding paper after 4 or 5 years.

Brother's MW-140BT's FAQs & Troubleshooting includes a document entitled The paper does not feed., which recommends checking that the paper is properly loaded, the cover closed, etc.

However, the final suggestion (reproduced below) to clean the pick-up roller with a piece of cellophane tape is marginally useful; it would sometimes allow one or two more prints before failing altogether (though it seemed to have less to do with cleaning and more to do with making the roller just tacky/sticky enough to pick up the paper):


1. Affix a piece of cellophane tape to the pick-up roller.
2. Remove the cellophane tape from the pick-up roller.
3. Rotate the pick-up and repeat the procedure to clean the entire surface of the roller.

Searching for a real solution to the paper feed problem, I stumbled onto No more paper jams or misfeeds!, which suggests using a rubber restorer like one of these:

(A similar product not mentioned in the article: CleanTex Rubber Roller Restorer.)

I went with CaiKleen RBR due to its diminutive size and applicator.

Applying a few drops to a couple of Q-tips and cleaning the roller with them worked wonders - several units that I had given up on began feeding perfectly.

One of the units needed a new battery; Brother would not ship their $92 BT100 MW-145BT Li-ion battery to my location, so I ordered NextBatteries' Brother MW-145BT battery (listed as a compatible replacement for Brother's BW-100 and BW-105 batteries) for $20.90 - it charged right up in an MW-120. (The original battery is held down by tape, so a bit of force is required to remove it.)

The A7 paper (model C-11 or C11S) required by the MPrint MW 100 series printers is still available from Brother.

/misc | Jun 17, 2020

Convert audio recordings to text via macOS Enhanced Dictation and Soundflower #

Environment

Setup

  1. Run Soundflower installer twice

  2. System Preferences > Sound > set both input and output device to "Soundflower (2ch)"

  3. System Preferences > Keyboard > Dictation > set "Dictation:" to "On", check "Use Enhanced Dictation", and set microphone to "Soundflower (2ch)".

  4. System Preferences > Accessibility > Dictation > uncheck "Mute audio output while dictating"

Use

  1. Begin playback of audio file

  2. Press Fn twice in TextEdit to start converting audio to text

Notes

  1. To uninstall Soundflower, delete Soundflower.kext from /Library/Extensions (and /System/Library/Extensions if present), sudo kextcache --prune-staging, and restart.

  2. Sound Siphon ($49) or Loopback ($99) can be substituted for Soundflower.

  3. Enhanced Dictation has been removed from Catalina. Therefore, all Dictation data (along with a slew of other information) is sent to Apple for processing:

    Mojave Catalina
  4. This regrettable change, coupled with an error message sometimes encountered in Mojave ("Dictation languages aren't available to download at this time. Try again later."), makes it all the more advisable to backup a copy of the Enhanced Dictation files once they are downloaded. They can be found in /System/Library/Speech/Recognizers/SpeechRecognitionCoreLanguages/ with filenames like en_US.SpeechRecognition, ja_JP.SpeechRecognition, etc.

Sources

Related

/mac | Jun 16, 2020

A humble iOS 14 wishlist #

/misc | Jun 14, 2020

Portable app for hot disk cloning a running Windows install #

Tom Ehlert's portable Drive Snapshot has been a longtime favorite for disk image backups, but it does not offer disk cloning.

Another product from Germany, Miray's HDClone, does; it can clone a running Windows system to another drive via the portable hdclone.exe.

However, HDClone comes in a dizzying array of versions:

all of which (other than the free version) are hobbled with activation schemes; even "Professional Portable", which is intended "for professional use on arbitrary PCs", requires a USB dongle:

Use on any PC to be serviced with a USB token provided by us. The software may be permanently installed on those PCs, but can only be used when the token is connected.

While the free version is saddled with a number of artificial limitations (max copy rate of 30MB/s, no support for USB 3.0 or disks over 2TB, no cloning to smaller disks, etc.), it does offer hot disk cloning of live, running Windows instances without the need to install any software or wrangle with activation.

The problem with activation schemes is highlighted by btesoroni's post Lost USB Token and hit limit of December 2019 (which went unanswered, prompting a followup post the next day, Is this company still in business???? which is also unanswered).

Miray, please stop punishing your customers with activation schemes and learn from Tom's nearly two decades of success with his activation-free Drive Snapshot.

/windows | Jun 14, 2020

A modest proposal #

End "Qualified Immunity"

End "Civil Forfeiture"

End "No-knock Warrants"

End the "War on Drugs"

Demilitarize the Police

Require Body Cameras

Setup Civilian Review Boards

Collect Data

Fire Liars

Stop Discriminating Against High IQ Applicants

/misc | Jun 11, 2020

Wealth #

/misc | Jun 09, 2020

Running multiple versions of Thunderbird #

Environment: Windows 10 with an existing default install of Mozilla Thunderbird ("C:\Program Files\Mozilla Thunderbird")

  1. Install desired second version (e.g., 60.9.1) to a new directory (e.g., "C:\Program Files\Mozilla Thunderbird 60") by selecting "Custom" as setup type

  2. Once installation completes, uncheck "Launch Mozilla Thunderbird now" and click Finish

  3. Edit Thunderbird 60's Desktop shortcut, appending a path to a new data directory (e.g., -profile "C:\Users\user\Documents\TB60DATA") to the Target field, which should then read "C:\Program Files\Mozilla Thunderbird 60\thunderbird.exe" -profile "C:\Users\user\Documents\TB60DATA"

  4. On first launch, close the "Set Up an Existing Email Account" and "System Integration" windows

  5. Right click the title bar then click "Menu Bar" > File > Offline > Work Offline

  6. Click Tools > Options > Advanced > Update > check "Never check for updates" > OK

At this point, you can setup an account, add extensions, etc.

In this example, we'll add Kaosmos' ImportExportTools and his updated version of Torge Kummerow's Email Address Crawler, both of which are compatible with Thunderbird 60.* (but no higher; see Christopher Leidigh's ImportExportTools NG for more recent versions):

  1. Download XPI files

  2. Set extensions.strictCompatibility to false in Config Editor (Tools > Options > Advanced > General > Config Editor) to enable Kaosmos' updated Email Address Crawler

  3. Install XPI files (Tools > Add-ons > Extensions > drag XPI files into window)

/windows | Jun 07, 2020

Fast, free (as in speech) MBOX viewer for Windows #

mboxviewer (alternately described as "Windows MBox Viewer" (on the cover of the impressive user guide) and "Simple MBox Viewer" (in the About dialog box)) is an open source MBOX viewer for Windows. Features include: large (>4GB) file support; export individual messages to EML; print some or all messages to CSV, plain text, HTML, or PDF; advanced search and sort; merge multiple MBOX files and remove duplicate messages; and more. One small undocumented quirk: files must have a .mbox extension in order to load (neither .mbx nor extensionless files will open).

/windows | Jun 06, 2020

macOS apps that make me smile #

While macOS has been relegated to the back burner (with disastrous if predictable results), a few intrepid developers continue to craft apps so performant and pleasing that I look for excuses to launch them:

All four can be launched consecutively before Messages can open or iTunes stop beachballing.

/mac | Jun 03, 2020


Subscribe or visit the archives.