un motor de búsqueda alternativo
Creado en respuesta al entorno de apatía respecto al uso de la búsqueda y el descubrimiento de hipertexto. En Lieu, lo que se puede buscar no es Internet, sino el propio barrio. Dicho de otra manera, Lieu es un motor de búsqueda local, una forma en que los anillos web personales aumentan las conexiones fortuitas.
Para conocer la sintaxis de búsqueda completa (incluido cómo utilizar site:
y -site:
:), consulte la sintaxis de búsqueda y la documentación de la API. Para obtener más consejos, lea el apéndice.
$ lieu help
Lieu: neighbourhood search engine
Commands
- precrawl (scrapes config's general.url for a list of links: <li> elements containing an anchor <a> tag)
- crawl (start crawler, crawls all urls in config's crawler.webring file)
- ingest (ingest crawled data, generates database)
- search (interactive cli for searching the database)
- host (hosts search engine over http)
Example:
lieu precrawl > data/webring.txt
lieu crawl > data/crawled.txt
lieu ingest
lieu host
Los comandos de rastreo y rastreo previo de Lieu se envían a la salida estándar para facilitar la inspección de los datos. Por lo general, desea redirigir su salida a los archivos que lee Lieu, como se define en el archivo de configuración. Consulte a continuación un flujo de trabajo típico.
config.crawler.webring
url
de la configuración en esa páginaprecrawl
: lieu precrawl > data/webring.txt
lieu crawl > data/crawled.txt
lieu ingest
lieu host
Después de ingerir los datos con lieu ingest
, también puede usar lugar para buscar el corpus en la terminal con lieu search
.
Modifique los valores theme
de la configuración, que se especifican a continuación.
El archivo de configuración está escrito en TOML.
[ general ]
name = " Merveilles Webring "
# used by the precrawl command and linked to in /about route
url = " https://webring.xxiivv.com "
# used by the precrawl command to populate the Crawler.Webring file;
# takes simple html selectors. might be a bit wonky :)
webringSelector = " li > a[href]:first-of-type "
port = 10001
[ theme ]
# colors specified in hex (or valid css names) which determine the theme of the lieu instance
# NOTE: If (and only if) all three values are set lieu uses those to generate the file html/assets/theme.css at startup.
# You can also write directly to that file istead of adding this section to your configuration file
foreground = " #ffffff "
background = " #000000 "
links = " #ffffff "
[ data ]
# the source file should contain the crawl command's output
source = " data/crawled.txt "
# location & name of the sqlite database
database = " data/searchengine.db "
# contains words and phrases disqualifying scraped paragraphs from being presented in search results
heuristics = " data/heuristics.txt "
# aka stopwords, in the search engine biz: https://en.wikipedia.org/wiki/Stop_word
wordlist = " data/wordlist.txt "
[ crawler ]
# manually curated list of domains, or the output of the precrawl command
webring = " data/webring.txt "
# domains that are banned from being crawled but might originally be part of the webring
bannedDomains = " data/banned-domains.txt "
# file suffixes that are banned from being crawled
bannedSuffixes = " data/banned-suffixes.txt "
# phrases and words which won't be scraped (e.g. if a contained in a link)
boringWords = " data/boring-words.txt "
# domains that won't be output as outgoing links
boringDomains = " data/boring-domains.txt "
# queries to search for finding preview text
previewQueryList = " data/preview-query-list.txt "
Para su propio uso, se deben personalizar los siguientes campos de configuración:
name
url
port
source
webring
bannedDomains
Los siguientes archivos definidos por la configuración pueden permanecer tal como están a menos que tenga requisitos específicos:
database
heuristics
wordlist
bannedSuffixes
previewQueryList
Para obtener un resumen completo de los archivos y sus diversas tareas, consulte la descripción de los archivos.
Construye un binario:
# this project has an experimental fulltext-search feature, so we need to include sqlite's fts engine (fts5)
go build --tags fts5
# or using go run
go run --tags fts5 .
Cree nuevos binarios de versión:
./release.sh
El código fuente AGPL-3.0-or-later
, Inter está disponible bajo SIL OPEN FONT LICENSE Version 1.1
, Noto Serif tiene Apache License, Version 2.0
.