local-searchengine

command module
v0.0.0-...-a42e392 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

README

Local SearchEngine

Powerful customizable local search engine based on Grafisearch.

Features

  • Nice wallpaper background (like Bing)
  • Fast
  • Support bangs (!rt, !wrenfr...)
  • Customizable theme
  • Instant response in some cases (like timer, calculatrice)
  • Have information in the full screen
  • Block some trash websites or "pay to view" website (pinterest, allocine, jeuxvideos.com...)
  • No ads

Installation

Docker

If you want to try the searchengine or to use it in docker, you can!

Setup the environment

Clone the repository and enter in it.

$ git clone https://github.com/anhgelus/local-searchengine
$ cd local-searchengine 

Copy the example/config.toml at the root of the project.

$ cp example/config.toml config.toml 

Create a new csv file for the stats at the root of the project.

$ touch stats.csv 
Creating the compose file

Create a new compose file.

$ touch compose.yaml 

Put this information in the compose file.

version: '3'

services:
  se: # se is for searchengine
    build: . # Build the Dockerfile
    ports:
      - "8042:8042" # The port to connect to
    volumes:
      - "./config.toml:/root/.config/local-searchengine/config.toml" # Path to the config.toml
      - "./stats.csv:/root/.local/share/local-searchengine/stats.csv" # Path to the stats file
      # And put here a path to the local wallpaper 
Building and Starting

Run and build the image.

$ docker compose up -d --build

Stop the container if you want to stop using this.

$ docker compose down
Linux

Download the latest binary

Or you can build it yourself

Build the binary

Clone the repository

$ git clone https://github.com/anhgelus/local-searchengine 

Build the repository with Go 1.20

$ go build -o local-searchengine .
Launch the binary for the first time

Run the binary and use the argument "install"

$ ./local-searchengine install

Exit (ctrl+c) Start the service

$ systemctl start --user local-searchengine.service

Configure your browser with this ip address : https://localhost:8042/?q=

Configuration

Open the configuration file ~/.config/local-searchengine/config.toml

Version = '0.1'
AppName = 'Local SearchEngine'
BlockList = ['pinterest.com', 'allocine.com', 'jeuxvideo.com', 'lemonde.fr', 'w3schools.com', 'pinterest.fr']
WallpaperPath = ''
LogoPath = ''

And customize what do you want.

Where the is stored?

The data is stored in ~/.local/share/local-searchengine/

How does it work?

The goal is to create a binary starting a webserver and the search engine. This server will take the results from some search engines and will reformat this results.

Technologies

  • Go 1.20
  • PuerkitoBio/goquery v1.8.0
  • fatih/color v1.14.1
  • pelletier/go-toml/v2 v2.0.6

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL