Skip to content

Instantly share code, notes, and snippets.

@arnavpraneet
arnavpraneet / LinkWardenExportjson2htmlconverter.py
Created May 20, 2024 19:34
A simple convertor in Python to take the backup.json file that is supplied by LinkWarden on clicking export or through the migration API and convert it into the Netscape bookmark HTML format which is supported by most other major bookmarking, read-it-later and link-saving applications (LinkDing, LinkAce, Briefkasten, Pocket, Readwise, Omnivore e…
import json
import logging
from datetime import datetime
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s')
def date_to_timestamp(date_str):
try:
dt = datetime.fromisoformat(date_str.replace('Z', '+00:00'))
return int(dt.timestamp())