Skip to content

Commit

Permalink
Rename package to sphinx-sql-backend
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Jan 28, 2024
1 parent 89a87df commit 8bb6fb9
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 28 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ instance/
# Sphinx documentation
docs/_build/

# PyCharm
.idea

# PyBuilder
target/

Expand Down
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
Latest changes
==============

unreleased
==========

- Friendly fork to divert into adding SQL backends for other databases


v0.1.3
======

Expand Down
59 changes: 39 additions & 20 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,41 +1,54 @@
===================
atsphinx-sqlite3fts
===================
==================
sphinx-sql-backend
==================

Power search for Sphinx by SQLite3-FTS extension.
SQL backend for the Sphinx documentation generator.

.. image:: https://img.shields.io/pypi/v/atsphinx-sqlite3fts.svg
:target: https://pypi.org/project/atsphinx-sqlite3fts/
.. image:: https://img.shields.io/pypi/v/sphinx-sql-backend.svg
:target: https://pypi.org/project/sphinx-sql-backend/

.. image:: https://github.com/atsphinx/sqlite3fts/actions/workflows/main.yml/badge.svg?branch=main
.. image:: https://github.com/panodata/sphinx-sql-backend/actions/workflows/main.yml/badge.svg?branch=main
:alt: Run CI
:target: https://github.com/atsphinx/sqlite3fts/actions/workflows/main.yml
:target: https://github.com/panodata/sphinx-sql-backend/actions/workflows/main.yml

.. image:: https://readthedocs.org/projects/atsphinx-sqlite3fts/badge/?version=latest
:target: https://atsphinx-sqlite3fts.readthedocs.io/en/latest/?badge=latest
.. image:: https://readthedocs.org/projects/sphinx-sql-backend/badge/?version=latest
:target: https://sphinx-sql-backend.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status

.. note:: This is experimental library
What's inside
=============

Overview
========
A Sphinx extension to provide Full-Text-Search (FTS) based on SQL
databases.

This is sphinx extension to provide search component with full-text search database.
The package is completely based on `atsphinx-sqlite3fts`_ by
`Kazuya Takei`_, so many kudos and thanks go out to him.
See also `sqlite3fts on GitHub`_.

When ``sphinx-build`` runs with this extension, builder generate these components.
Status
======

* SQLite database with FTS extension
* Records of all documents
* Search page HTML with sql.js
Please note that the ``sphinx-sql-backend`` package contains alpha-, beta- and
incubation-quality code, and as such, is considered to be a work in progress.
Contributions of all kinds are much welcome, in order to make it more solid,
and to add features.

This will be useful when you want to embed strong full-text search with keeping static-site structure.
Breaking changes should be expected until a 1.0 release, so version pinning is
strongly recommended, especially when you use it as a library.

How it works
============

* Indexing: When running ``sphinx-build``, store documents into database.
* Searching: Provide backend service for responding to search requests and
search-as-you-type UI based on `readthedocs-sphinx-search`_.

Installation
============

.. code-block:: console
pip install atsphinx-sqlite3fts
pip install git+https://github.com/panodata/sphinx-sql-backend.git
Usage
=====
Expand Down Expand Up @@ -64,3 +77,9 @@ Usage
python -m http.server -d build
Please access http://localhost:8000/search.html
.. _atsphinx-sqlite3fts: https://pypi.org/project/atsphinx-sqlite3fts/
.. _Kazuya Takei: https://github.com/attakei
.. _readthedocs-sphinx-search: https://github.com/readthedocs/readthedocs-sphinx-search
.. _sqlite3fts on GitHub: https://github.com/atsphinx/sqlite3fts
4 changes: 2 additions & 2 deletions docs/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ This is published on PyPI.

.. code-block:: console
pip install atsphinx-sqlite3fts
pip install sphinx-sql-backend
If you want to try latest source, install from GitHub.

.. code-block:: console
pip install git+https://github.com/atsphinx/sqlite3fts.git
pip install git+https://github.com/panodata/sphinx-sql-backend.git
Usage
=====
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "atsphinx-sqlite3fts"
authors = [{name = "Kazuya Takei", email = "[email protected]"}]
name = "sphinx-sql-backend"
authors = [{name = "Andreas Motl", email = "[email protected]"}]
readme = "README.rst"
license = {file = "LICENSE"}
classifiers = [
Expand Down Expand Up @@ -54,9 +54,9 @@ test = [
atsphinx-sqlite3fts = "atsphinx.sqlite3fts.cli:main"

[project.urls]
Home = "https://atsphinx.github.io/sqlite3fts"
Repository = "https://github.com/atsphinx/sqlite3fts"
Documentation = "https://atsphinx-sqlite3fts.readthedocs.io/"
Home = "https://github.com/panodata/sphinx-sql-backend"
Repository = "https://github.com/panodata/sphinx-sql-backend"
Documentation = "https://sphinx-sql-backend.readthedocs.io/"

[tool.flit.module]
name = "atsphinx.sqlite3fts"
Expand Down
9 changes: 8 additions & 1 deletion src/atsphinx/sqlite3fts/models.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
"""Management database schema."""
"""
Database schema / ORM entity definition.
- atsphinx-sqlite3fts is using SQLite.
- sphinx-sql-backend is aiming to add support for others.
TODO: Add support for multiple database backends?
"""
from pathlib import Path
from typing import Iterable

Expand Down

0 comments on commit 8bb6fb9

Please sign in to comment.