เครื่องมือค้นหาทางเลือก
สร้างขึ้นเพื่อตอบสนองต่อสภาพแวดล้อมที่ไม่แยแสเกี่ยวกับการใช้การค้นหาและการค้นพบไฮเปอร์เท็กซ์ ในภาษา Lieu อินเทอร์เน็ตไม่ใช่สิ่งที่ทำให้ค้นหาได้ แต่เป็นพื้นที่ใกล้เคียงของตนเอง กล่าวอีกนัยหนึ่ง Lieu เป็นเครื่องมือค้นหาพื้นที่ใกล้เคียง ซึ่งเป็นวิธีสำหรับการเชื่อมต่อส่วนบุคคลเพื่อเพิ่มการเชื่อมโยงโดยบังเอิญ
สำหรับไวยากรณ์การค้นหาแบบเต็ม (รวมถึงวิธีใช้ site:
และ -site:
) โปรดดูไวยากรณ์การค้นหาและเอกสารประกอบ API หากต้องการเคล็ดลับเพิ่มเติม โปรดอ่านภาคผนวก
$ 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
คำสั่ง crawl & precrawl ของ Lieu จะส่งออกไปยังเอาต์พุตมาตรฐาน เพื่อให้ตรวจสอบข้อมูลได้ง่าย โดยทั่วไปคุณต้องการที่จะเปลี่ยนเส้นทางเอาต์พุตไปยังไฟล์ที่ Lieu อ่านตามที่กำหนดไว้ในไฟล์กำหนดค่า ดูด้านล่างสำหรับขั้นตอนการทำงานทั่วไป
config.crawler.webring
url
ของการกำหนดค่าเป็นหน้านั้นprecrawl
: lieu precrawl > data/webring.txt
lieu crawl > data/crawled.txt
lieu ingest
lieu host
หลังจากนำเข้าข้อมูลด้วย lieu ingest
แล้ว คุณยังสามารถใช้ lieu เพื่อค้นหาคลังข้อมูลในเทอร์มินัลด้วย lieu search
ปรับแต่งค่า theme
ของการกำหนดค่าตามที่ระบุด้านล่าง
ไฟล์ปรับแต่งเขียนด้วยภาษา 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 "
สำหรับการใช้งานของคุณเอง ควรปรับแต่งฟิลด์การกำหนดค่าต่อไปนี้:
name
url
port
source
webring
bannedDomains
ไฟล์ที่กำหนดการกำหนดค่าต่อไปนี้สามารถคงสภาพเดิมได้ เว้นแต่คุณจะมีข้อกำหนดเฉพาะ:
database
heuristics
wordlist
bannedSuffixes
previewQueryList
หากต้องการสรุปไฟล์ทั้งหมดและงานต่างๆ โปรดดูคำอธิบายไฟล์
สร้างไบนารี:
# 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 .
สร้างไบนารีรีลีสใหม่:
./release.sh
ซอร์สโค้ด AGPL-3.0-or-later
, Inter มีให้บริการภายใต้ SIL OPEN FONT LICENSE Version 1.1
, Noto Serif ได้รับอนุญาตเป็น Apache License, Version 2.0