tiny php sqlite search engine
Go to file
xfnw 854aa79255 clean up css a bit 2022-02-24 19:01:20 -05:00
assets clean up css a bit 2022-02-24 19:01:20 -05:00
.gitignore add wildcards to gitignore 2021-10-20 15:18:29 -04:00
LICENSE rename LICENSE 2021-10-22 16:12:28 -04:00
README.md rename LICENSE 2021-10-22 16:12:28 -04:00
crawl.php fix mdash not being htmldecoded 2021-12-11 12:50:41 -05:00
create.sql use sqlite's FTS5 as the ranking algorithm 2021-10-20 16:41:36 -04:00
index.php automatic focus of search bar 2021-10-27 19:03:53 -04:00
urls.sh use sqlite's FTS5 as the ranking algorithm 2021-10-20 16:41:36 -04:00

README.md

searpl

searpl is a small php search engine with the following features:

  • robot.txt compliant
  • sqlite, so theres no need to run some fancy database daemon
  • javascript-free
  • no cdns!
  • read-only database, nothing is written except with the shell

licensing

searpl is licensed under an MIT licence, see LICENSE for more information

setup

this guide assumes you have shell access and are comfortable using command line tools like git.

  • make sure you have php, php-pdo, wget, sqlite3 and git installed
  • go in your htdocs, public_html or whatever and git clone this repo
  • touch db.sqlite to create the database
  • copy the contents of create.sql and paste it into the prompt on sqlite3 db.sqlite to create the table

crawling

to crawl a site, do ./urls.sh https://example.com

to recursively crawl, change the recursion limit with -l

./urls.sh -l5 https://example.com