Google Plus takeout to static html


Google Plus shutdown earlier April 2019, and I downloaded by Google takeout tools.
Each post becomes a static html page in the takeout, which needs conversion.
I wrote a python tool to convert one year of posts into a single page. Totally hundreds of posts from the last 6 years.
A “Read More” button was added so that it shows a few posts initially, and show all when button clicked.
It was done by Python and Javascript with no framework.
I tried ghost, the publishing platform based on Node.js, but felt it was a overkill.

Tools used:

Ghost: Ghost v2.14.1, requires Node.js version 10. default port 2368 and bind only to locahost in config.development.json.
expose to internet by nginx proxy in proxy_pass https://127.0.0.1:2368;
Python to parse Google Plus Takeout files, modules used by main.py:
html.parser, html.entities, ntpath since it’s on Windows 10, re to extract Youtube ID.
The JavaScript Read More button:
reorder the posts in reverse chronological order by document.body.childNodes
hide the earlier posts by putting them into a <span> and swap between .style.display = “none” .style.display = “inline”

Here is a sample page converted from google takeout, most postings in Chinese:
http://riowing.net/post/2019.htm

Advertisements
Comments are closed.
%d bloggers like this: