Created
May 26, 2025 15:52
-
-
Save tohuuuuu/67de3f11fe952ac26fc8af345096217b to your computer and use it in GitHub Desktop.
Convert Pocket CSV Data Export to HTML
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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')) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Doesn't look nice, but works as import into Cloud Bookmarks app.