Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hbmartin/safari-to-sqlite
Save tabs from Safari to a SQLite database. Supports Datasette. Can sync multiple devices with Turso.
https://github.com/hbmartin/safari-to-sqlite
browser-automation datasette macos safari sqlite
Last synced: 27 days ago
JSON representation
Save tabs from Safari to a SQLite database. Supports Datasette. Can sync multiple devices with Turso.
- Host: GitHub
- URL: https://github.com/hbmartin/safari-to-sqlite
- Owner: hbmartin
- License: apache-2.0
- Created: 2024-07-09T01:15:53.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-15T20:04:28.000Z (about 1 month ago)
- Last Synced: 2024-10-17T05:45:26.523Z (about 1 month ago)
- Topics: browser-automation, datasette, macos, safari, sqlite
- Language: Python
- Homepage:
- Size: 52.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# safari-to-sqlite
[![PyPI](https://img.shields.io/pypi/v/safari-to-sqlite.svg)](https://pypi.org/project/safari-to-sqlite/)
[![Lint](https://github.com/hbmartin/safari-to-sqlite/actions/workflows/lint.yml/badge.svg)](https://github.com/hbmartin/safari-to-sqlite/actions/workflows/lint.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Code style: black](https://img.shields.io/badge/🐧️-black-000000.svg)](https://github.com/psf/black)
[![Checked with pytype](https://img.shields.io/badge/🦆-pytype-437f30.svg)](https://google.github.io/pytype/)
[![Versions](https://img.shields.io/pypi/pyversions/safari-to-sqlite.svg)](https://pypi.python.org/pypi/safari-to-sqlite)
[![discord](https://img.shields.io/discord/823971286308356157?logo=discord&label=&color=323338)](https://discord.gg/EE7Hx4Kbny)
[![twitter](https://img.shields.io/badge/@hmartin-00aced.svg?logo=twitter&logoColor=black)](https://twitter.com/hmartin)Save tabs from Safari to a SQLite database. Multiple devices can be synced with Turso. Search and explore with [Datasette](https://datasette.io/)!
- [How to install](#how-to-install)
- [Usage](#usage)
- [Authentication](#authentication)
- [Downloading missing body content](#downloading-missing-body-content)## How to install
This package is available on PyPI and can be installed with pipx:
```bash
brew install pipx
pipx install safari-to-sqlite
```## Usage
To save your Safari tabs to a SQLite database, run:
```bash
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:
```bash
safari-to-sqlite tabs.db
```## Authentication
Cross device sync is possible using a [Turso](https://turso.tech) account.
You can configure your own database or allow this tool to automatically perform setup for you.
To authenticate, run:```bash
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:
```bash
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
```bash
brew install python3
# If you don't have python3 installedgit clone [email protected]:hbmartin/safari-to-sqlite.git
cd safari-to-sqlitepython3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtpython -m safari_to_sqlite
```### Code Formatting
This project is linted with [ruff](https://docs.astral.sh/ruff/) and uses [Black](https://github.com/psf/black) code formatting.
## Authors
* [Harold Martin](https://www.linkedin.com/in/harold-martin-98526971/) - harold.martin at gmail
## License
© [Harold Martin](https://www.linkedin.com/in/harold-martin-98526971/) - released under [Apache-2.0 license](LICENSE.txt)
Safari is a registered trademark of Apple Inc.