PHP, Programming

Export iMessages and SMS conversations as HTML

A couple of years ago, I explained how to get instant message conversations exported out of iChat as HTML files. Now it’s 2016, and Messages has replaced iChat, and iMessages have replaced all interpersonal communication. So how do you get HTML transcripts of your iMessages and text messages? Here’s how: with my new OSX Messages Exporter script.

The script exports all of your text/iMessage conversations from Messages (including group chats) and generates HTML files for each conversation. Here’s a screenshot of the HTML file generated for a iMessage conversation between me and my brother:

Screen Shot 2016-06-20 at 10.15.35 PM

And here’s what a group conversation looks like:

Screen Shot 2016-06-20 at 10.22.55 PM

(For a look at the actual HTML, see the example.html file in the repository.)

I’ll admit that there are a number of existing solutions for exporting conversations out of Messages, but mine has some distinct advantages over them:

  1. It supports group conversations.
  2. It generates human- and machine-readable HTML.
  3. It saves all attachments.
  4. It uses contacts’ names, not just their phone numbers.
  5. I wrote it.

If you want to give it a spin, download it from GitHub and run

./messages-exporter.php --help

from the command line for the current usage instructions.

Standard
Unpredictable Image Filenames, WordPress

New WordPress Plugin: Unpredictable Image Filenames

I’ve written a new WordPress plugin to help protect uploaded images from being accessed just by guessing the URL.

Many cameras and smartphones number their images in a predictable format. For example, iPhones use the format IMG_0001.jpg. If you include IMG_0345.jpg in a blog post, an unsavory third party could start regularly trying to access IMG_0346.jpg, attempting to view the image before you publish a post containing it.

Or, maybe you have a private blog that you only allow family members to read. Not all “private blog” plugins are able to require authentication to load images from /wp-content/, so the same unsavory third party could just start guessing URLs like /wp-content/uploads/2016/05/IMG_0001.jpg, hoping to eventually get a hit. 9,999 requests would enumerate every possible image from an iPhone for each month, almost definitely allowing an unauthorized person access to your photos.

The Unpredictable Image Filenames plugin for WordPress renames image files to a sufficiently unguessable name when you upload them. For example, IMG_0345.jpg could end up as 334AB1E8-28AB-4BE1-882D-3C112E95F055.jpg, and IMG_0346.jpg could be renamed A67C9CF9-0BB5-4FB4-AD03-DCB294F853EC.jpg. Try and guess that!

You can install Unpredictable Image Filenames from your WordPress admin plugins screen, download it from the .org plugins directory, or view the source on GitHub.

Standard
3D Printing, Programming

Today’s Functional Print: Baby Gate Support

In today’s “No, don’t go up there” news, I’ve printed a custom baby gate support.

IMG_4384

Based on a design by Thingiverse user Printed_Solid, this support allows a pressure gate to be used against a post without attaching a wall cup, which would leave a permanent screw hole. I updated the original design to have longer and thicker corners to prevent strong children from pulling it off of the post, and the entire part is customizable to fit your specific post.

The SCAD script is available on GitHub, and the part can be customized and downloaded on Thingiverse.

Standard
OpenSCAD, Programming

Animating the Solar System with OpenSCAD

OpenSCAD is my language of choice for designing objects that will be 3D-printed, but I just recently learned that it also supports 3D animation.

To familiarize myself with this feature, I decided to animate the movement of the planets in our solar system. Here’s a GIF excerpt of the animation generated by OpenSCAD; it covers about 2.5 Earth years:

solar-system

Neat, right? The axial tilts and orbital periods, speeds, and inclinations of the planets and moons are all accurate, but for visibility purposes, I scaled the size of the planets up 20x relative to the size of the sun and reduced the distance between them by 98%. The relative positions of the planets are also reasonably accurate for March 2016.

The script is available on GitHub; let me know in the comments if you’ve ever used OpenSCAD’s animation feature and what you made with it!

Standard
3D Printing, Games, OpenSCAD, Programming

Today’s Functional Print: Board Game Piece Bases

In today’s “do you think this is some sort of game?” news, I’ve designed and printed some boardgame piece bases.

These were printed specifically for my son’s “Thomas and Friends Tracks and Trestles” game, which was missing two of its bases, but the design is customizable to fit almost any size gamepiece.

The OpenSCAD script and STL file are available on GitHub, and you can customize your own gamepiece base on Thingiverse.

Standard
3D Printing, OpenSCAD, Programming

Today’s Functional Print: Stove Knob

In today’s “customizable knob” news, I’ve designed and printed a customizable knob.

When we moved into our current house, the knob to control the stovetop fan was missing:

IMG_4271

After six months of procrastinating and one hour of OpenSCAD, it now looks like this:

IMG_4274

Now I don’t have to turn on the fan with a pliers!

IMG_4273

The OpenSCAD script and STL file are available on GitHub, and you can create your own customized knob in Thingiverse.

Standard