eine alternative Suchmaschine
Erstellt als Reaktion auf die verbreitete Apathie gegenüber der Verwendung von Hypertext-Suche und -Erkennung. Stattdessen wird nicht das Internet durchsuchbar gemacht, sondern die eigene Nachbarschaft. Anders ausgedrückt ist Lieu eine Nachbarschaftssuchmaschine, eine Möglichkeit für persönliche Webringe, zufällige Kontakte zu knüpfen.
Die vollständige Suchsyntax (einschließlich der Verwendung site:
und -site:
:) finden Sie in der Suchsyntax- und API-Dokumentation. Weitere Tipps finden Sie im Anhang.
$ 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
Die Crawl- und Precrawl-Befehle von Lieu werden zur einfachen Überprüfung der Daten auf die Standardausgabe ausgegeben. Normalerweise möchten Sie ihre Ausgabe auf die Dateien umleiten, aus denen Lieu liest, wie in der Konfigurationsdatei definiert. Unten finden Sie einen typischen Arbeitsablauf.
config.crawler.webring
hinzuurl
Feld der Konfiguration auf diese Seite festprecrawl
aus: lieu precrawl > data/webring.txt
lieu crawl > data/crawled.txt
lieu ingest
lieu host
Nachdem Sie die Daten mit lieu ingest
aufgenommen haben, können Sie mit „lieu“ auch den Korpus im Terminal mit lieu search
durchsuchen.
Passen Sie die unten angegebenen theme
der Konfiguration an.
Die Konfigurationsdatei ist in TOML geschrieben.
[ 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 "
Für den eigenen Gebrauch sollten die folgenden Konfigurationsfelder angepasst werden:
name
url
port
source
webring
bannedDomains
Die folgenden konfigurationsdefinierten Dateien können unverändert bleiben, sofern Sie keine besonderen Anforderungen haben:
database
heuristics
wordlist
bannedSuffixes
previewQueryList
Eine vollständige Übersicht über die Dateien und ihre verschiedenen Aufgaben finden Sie in der Dateibeschreibung.
Erstellen Sie eine Binärdatei:
# 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 .
Erstellen Sie neue Release-Binärdateien:
./release.sh
Quellcode AGPL-3.0-or-later
, Inter ist unter SIL OPEN FONT LICENSE Version 1.1
verfügbar, Noto Serif ist unter Apache License, Version 2.0
lizenziert.