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.

7 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
  5. The battle against drug addiction is a significant public health challenge in New Jersey, impacting countless lives and communities. Fortunately, the state offers a variety of drug rehab programs aimed at providing individuals with the support and resources needed to overcome substance use disorders (SUD). In this article, we’ll explore the different types of drug rehab facilities available in New Jersey, effective treatment approaches, and essential factors to consider when choosing a program.

    ReplyDelete
  6. As the beauty industry continues to evolve, innovative treatments are gaining popularity for their ability to enhance natural features without the need for invasive procedures. One such treatment is "Botox lipstick," a technique that uses Botox injections to create the appearance of fuller, more youthful lips. In this article, we’ll explore what Botox lipstick is, how it works, its benefits, and what to expect during the treatment process.

    ReplyDelete
  7. Outpatient mental health programs offer flexible treatment, including therapy and support, for managing conditions like anxiety, depression, and trauma. 🧠💬 Get personalized care without overnight stays. 🌟






    ReplyDelete