Last active
May 26, 2020 20:07
-
-
Save ziadoz/6226f83d092f4e155a5cff5383c2d869 to your computer and use it in GitHub Desktop.
Export iCloud Tabs/URLs to CSV
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 bash | |
alias icloud_tabs='sqlite3 -header -csv ~/Library/Safari/CloudTabs.db "select ctd.device_name, ct.title, ct.url from cloud_tabs as ct inner join cloud_tab_devices as ctd on ctd.device_uuid = ct.device_uuid order by device_name asc, position asc"' | |
# Output to CSV file: | |
icloud_tabs > icloud_tabs.csv | |
# Unique CSV: | |
sort -u icloud_tabs.csv -o icloud_tabs_unique.csv | |
# Merge CSVs: | |
cat icloud_tabs_1.csv icloud_tabs_2.csv > icloud_tabs_merged.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment