Skip to main content
100%

HTML browser favorites to CSV

✓ Published0🌍 Public
TThomasG77
Last edited Mar 21, 2024
Created on Mar 21, 2024

This example converts browser-exported HTML bookmark files into a clean CSV table with two columns: page titles and their URLs. The pipeline uses three command-line tools: pup extracts JSON objects from the HTML structure, jq reformats the data into CSV rows, and he decodes HTML entities back into readable text. The final output is a plain-text CSV file, making bookmark data easy to import into spreadsheets or other data tools. The code demonstrates a lightweight, scriptable approach to data cleaning without a graphical interface.

AI-generated description

HTML browser favorites to CSV

Need pup (Go based), jq (install as binary) and he (Node based)

Take the html export from your browser

cat your_favorites.html | pup a json{} | jq -c -r '["title","url"], (.[] | [.text,.href]) | @csv' | he --decode >| your_favorites_decoded.csv

Similar vizzes