High-fidelity Google Docs exporter to plain HTML+CSS - behdad/gdocs-me-up
Over the years I had written dozens of Google Docs documents, that I wanted to post to my website. Not only Google Docs's publish feature is broken and incomplete, Google does not index Google Docs either. So I set out to fix it for myself using AI agents. Sharing here in case someone else finds it useful.
8 comments
arshxyz10 days ago
Amazing how many products exist purely due to Google's lack of motivation to do things right. Will be using this a lot.
Does Google Apps Script expose an API to do this though? It would be easier to download an html page from within GDocs without having to run something locally.
snoopen10 days ago
I haven't had a detailed look but yeah, I think most of this could be rolled into a Google App Script and made into an add-on. I actually did something similar years ago but for exporting to html for email, going through a few libraries for html and CSS manipulation and inlining.
behdad9 days ago
Possibly. I wasn't determined enough to look into that. Plus, it's easier for me to batch download my documents from the terminal.
Note that it will be a HTML plus directory of images, so you need to return an archive.
97-109-10710 days ago
Thank you for publishing this.
After years of trying to edit things locally and share/publish on Google Docs I gave up.
You either have to commit fully to Google Docs or sidestep. I'm sidestepping with smalldocs at this time.
adityamishra24110 days ago
This looks really useful. Does it also preserve images, tables, and formatting when exporting from Google Docs?
behdad9 days ago
I use it extensively to preserve images and formatting, in the pageless layout. I haven't tested it much with tables. Give it a try and file issues if it doesn't work well and I'll pass on to my agents. Thanks!
hwc10 days ago
Behdad, why isn't this just part of Google Docs?
behdad9 days ago
Good question, isn't it? GDocs has a "publish to web" feature, but it's vastly broken and loses formatting and image sizing and everything. It's just not priority for Google.
Read the full thread on Hacker News →
Related stories
- Google announces new experimental "CC" AI agent for familiesarstechnica.comArs Technica · 0 points · 13 days ago
- Ars Technica · 0 points · about 7 hours ago
- Ars Technica · 0 points · about 11 hours ago
- Google seemingly confirms plans to kill ChromeOS in 2034arstechnica.comArs Technica · 0 points · 2 days ago
- Ars Technica · 0 points · 9 days ago
- Hacker News · 3 points · 4 days ago