Saturday, May 23, 2015

Extracting Base64 Images from Google Keep Archives

I love Google Keep! It's a nice-looking note-taking app with more features than I ever use.

But once I made the mistake of staring a photo album in Keep. (If you don't know, you can add photos to a note either by taking a picture or finding on on 'disk.') To my chagrin I discovered that there's no way to get these photos out of Keep.

So I was super happy when I saw that Google Takeout now exports Google Keep files. "Great!" I thought, I'll just download my whole archive and grab those files. Again, much to my chagrin, I discovered that the photos were not in the Takeout archive as JPG files, but rather encoded as base64 strings inside the html page. So for example, I have a note called "Dogs" and all the photos are base64 encoded inside that "Dogs.html" note in the Takeout archive.

This is seriously annoying.

So, I wrote a Python script to get these images out. It's called the "Keep Photo Dump."

To use it you have to have Python installed. At the terminal, you would run:
./keep_photo_dump.py Dogs.html

and all the images in the file will be dumped as Dogs1.jpg, Dogs2.jpg, etc.

Hope this helps someone else.

4 comments:

  1. Casino Jeju Island: Situated on the picturesque island of Jeju, casinos offer a unique gaming experience amidst breathtaking natural beauty. With a variety of games and luxurious amenities, Casino Jeju Island is a top destination for travelers seeking excitement and relaxation.

    ReplyDelete
  2. Non Gamstop UK Casino: A non Gamstop UK casino offers a variety of games and excellent bonuses for UK players. Enjoy a more flexible and unrestricted gaming experience.

    ReplyDelete
  3. Alcohol Rehab Nashville: Alcohol rehab services in Nashville are geared towards helping individuals achieve sobriety through detox, personalized therapy, and ongoing support systems.

    ReplyDelete
  4. Rehab centers often provide vocational training to help individuals rebuild their careers post-recovery.

    ReplyDelete