Skip to main content

safari-to-sqlite

PyPI Lint Ruff Code style: black Checked with pytype Versions discord twitter

Save tabs from Safari to a SQLite database. Multiple devices can be synced with Turso. Search and explore with Datasette!

How to install

This package is available on PyPI and can be installed with pipx:

brew install pipx
pipx install safari-to-sqlite

Usage

To save your Safari tabs to a SQLite database, run:

safari-to-sqlite

This will save the tabs to a file called safari-tabs.db in your current directory.

Or to specify a database file:

safari-to-sqlite tabs.db

Authentication

Cross device sync is possible using a Turso account. You can configure your own database or allow this tool to automatically perform setup for you. To authenticate, run:

safari-to-sqlite auth

If you don't have an existing Turso account or database, no problem! This command will walk you through the setup process by installing the Turso CLI with brew and creating a new database for you. Otherwise, you can manually enter your own database URL and token.

Downloading missing body content

Safari may not return the tab's body content if it is not available for some reason. To download and extract page content when this is missing, run:

safari-to-sqlite download

Development

Pull requests are very welcome! For major changes, please open an issue first to discuss what you would like to change.

Setup

brew install python3
# If you don't have python3 installed

git clone git@github.com:hbmartin/safari-to-sqlite.git
cd safari-to-sqlite

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

python -m safari_to_sqlite

Code Formatting

This project is linted with ruff and uses Black code formatting.

Authors

License

© Harold Martin - released under Apache-2.0 license

Safari is a registered trademark of Apple Inc.

Metadata

Release files for safari-to-sqlite 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for safari-to-sqlite 0.4.0
File Size Uploaded
safari_to_sqlite-0.4.0.tar.gz 20.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for safari-to-sqlite 0.4.0
File Interpreter ABI Platform
safari_to_sqlite-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 41.7 kB

Release files / safari_to_sqlite-0.4.0.tar.gz

Download URL safari_to_sqlite-0.4.0.tar.gz
Size 20.7 kB
Tags Source
SHA-256 checksum
How to use checksums
980f0818dff071c6b46ab20c8bbf65c1dd57884d325e4ad30b258abf1df022f2
BLAKE2b-256 checksum
How to use checksums
e240f759488b4c836fbdac1be90139837d9c45759fef362769bd4b05bf60e12b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release files / safari_to_sqlite-0.4.0-py3-none-any.whl

Download URL safari_to_sqlite-0.4.0-py3-none-any.whl
Size 20.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
515d310c1ee4108a5b68f1e02d6ac8c88c8aeb861fa27c8e315b692c93981ed6
BLAKE2b-256 checksum
How to use checksums
316c09609399a3229e55e9af7709e725bc2c002d71faf1f797588dfe22bf0d89
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.0 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page