um mecanismo de pesquisa alternativo
Criado em resposta aos ambientes de apatia em relação ao uso de pesquisa e descoberta de hipertexto. Em Lieu, a Internet não é o que se torna pesquisável, mas sim o próprio bairro. Em outras palavras, Lieu é um mecanismo de busca de bairro, uma forma de webrings pessoais aumentarem conexões fortuitas.
Para obter a sintaxe de pesquisa completa (incluindo como usar site:
e -site:
), consulte a sintaxe de pesquisa e a documentação da API. Para mais dicas, leia o 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
Os comandos de rastreamento e pré-rastreamento do Lieu são enviados para a saída padrão, para fácil inspeção dos dados. Normalmente, você deseja redirecionar sua saída para os arquivos dos quais Lieu lê, conforme definido no arquivo de configuração. Veja abaixo um fluxo de trabalho típico.
config.crawler.webring
url
da configuração para essa páginaprecrawl
: lieu precrawl > data/webring.txt
lieu crawl > data/crawled.txt
lieu ingest
lieu host
Depois de ingerir os dados com lieu ingest
, você também pode usar lieu para pesquisar o corpus no terminal com lieu search
.
Ajuste os valores theme
da configuração, especificados abaixo.
O arquivo de configuração está escrito em 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 seu próprio uso, os seguintes campos de configuração devem ser customizados:
name
url
port
source
webring
bannedDomains
Os seguintes arquivos definidos pela configuração podem permanecer como estão, a menos que você tenha requisitos específicos:
database
heuristics
wordlist
bannedSuffixes
previewQueryList
Para um resumo completo dos arquivos e seus diversos trabalhos, consulte a descrição dos arquivos.
Construa um binário:
# 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 .
Crie novos binários de lançamento:
./release.sh
Código fonte AGPL-3.0-or-later
, Inter está disponível sob SIL OPEN FONT LICENSE Version 1.1
, Noto Serif está licenciado como Apache License, Version 2.0
.