Skip to content

Instantly share code, notes, and snippets.

@tohuuuuu
Created May 26, 2025 15:52
Show Gist options
  • Select an option

  • Save tohuuuuu/67de3f11fe952ac26fc8af345096217b to your computer and use it in GitHub Desktop.

Select an option

Save tohuuuuu/67de3f11fe952ac26fc8af345096217b to your computer and use it in GitHub Desktop.
Convert Pocket CSV Data Export to HTML
#!/usr/bin/env python3
import re
import pandas
from airium import Airium
dataframe = pandas.read_csv("part_000000.csv", delimiter=",")
dataset = dataframe.values
a = Airium()
a('<!DOCTYPE html>')
with a.html(lang="de"):
with a.head():
a.meta(charset="utf-8")
a.title(_t="Bookmarks")
with a.body():
for data in dataset:
with a.a(href=data[1], TAGS=data[3], ADD_DATE=data[2]):
a(data[0])
with open('bookmarks.html', 'wb') as f:
html = str(a)
f.write(bytes(html, encoding='utf8'))
@tohuuuuu
Copy link
Author

Doesn't look nice, but works as import into Cloud Bookmarks app.

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