Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Export manualy your google bookmarks and transform it to markdown format for hosting and versioning on github (quick and dirty)
# First export manualy your google bookmarks in place exported file in the same directory of this script
# After launch this script (python and have fun !
def run():
output = []
with open('GoogleBookmarks.html') as export:
html = export.readlines()
for line in html:
if 'H3' in line:
output.append('## {0}'.format(line[36:-6].capitalize()))
if 'A HREF' in line:
data = line.split()
link = data[1].replace('HREF="', '').replace('"', '')
text = line.replace(link, '')[43:-5].capitalize()
output.append('- [{0}]({1})'.format(text, link))
with open('', 'w+') as markdown:
if __name__ == "__main__":

This comment has been minimized.

Copy link
Owner Author

@4383 4383 commented Dec 2, 2016

This is a quick and dirtty script for transform your google bookmarks on an file at markdown format.
After you can host it on github for beneficiate of versioning system and also of the gh-pages hosting.
Exemple of result (with my personal bookmarks)


This comment has been minimized.

Copy link

@drmingdrmer drmingdrmer commented Jul 27, 2020

I found another way to do this: copy HTML page, and paste in typora.
Typora is a great markdown editor that converts HTML to markdown when pasting and keeps most styles. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment