• Stars
    star
    869
  • Rank 52,497 (Top 2 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created about 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Lightning-fast file system indexer and search tool

GitHub CodeFactor Development snapshots

Demo: sist2.simon987.net

sist2

sist2 (Simple incremental search tool)

Warning: sist2 is in early development

search panel

Features

  • Fast, low memory usage, multi-threaded
  • Manage & schedule scan jobs with simple web interface (Docker only)
  • Mobile-friendly Web interface
  • Extracts text and metadata from common file types *
  • Generates thumbnails *
  • Incremental scanning
  • Manual tagging from the UI and automatic tagging based on file attributes via user scripts
  • Recursive scan inside archive files **
  • OCR support with tesseract ***
  • Stats page & disk utilisation visualization
  • Named-entity recognition (client-side) ****

* See format support
** See Archive files
*** See OCR
**** See Named-Entity Recognition

Getting Started

Using Docker Compose (Windows/Linux/Mac)

version: "3"

services:
  elasticsearch:
    image: elasticsearch:7.17.9
    restart: unless-stopped
    environment:
      - "discovery.type=single-node"
      - "ES_JAVA_OPTS=-Xms2g -Xmx2g"
  sist2-admin:
    image: simon987/sist2:3.1.0-x64-linux
    restart: unless-stopped
    volumes:
      - ./sist2-admin-data/:/sist2-admin/
      - /:/host
    ports:
      - 4090:4090 # sist2
      - 8080:8080 # sist2-admin
    working_dir: /root/sist2-admin/
    entrypoint: python3 /root/sist2-admin/sist2_admin/app.py

Navigate to http://localhost:8080/ to configure sist2-admin.

Using the executable file (Linux/WSL only)

  1. Choose search backend (See comparison):

    • Elasticsearch: have an Elasticsearch (version >= 6.8.X, ideally >=7.14.0) instance running
      1. Download from official website
      2. (or) Run using docker:
        docker run -d -p 9200:9200 -e "discovery.type=single-node" elasticsearch:7.17.9
    • SQLite: No installation required
  2. Download the latest sist2 release. Select the file corresponding to your CPU architecture and mark the binary as executable with chmod +x.

  3. See usage guide for command line usage.

Example usage:

  1. Scan a directory: sist2 scan ~/Documents --output ./documents.sist2
  2. Prepare search index:
    • Elasticsearch: sist2 index --es-url http://localhost:9200 ./documents.sist2
    • SQLite: sist2 index --search-index ./search.sist2 ./documents.sist2
  3. Start web interface: sist2 web ./documents.sist2

Format support

File type Library Content Thumbnail Metadata
pdf,xps,fb2,epub MuPDF text+ocr yes author, title
cbz,cbr libscan - yes -
audio/* ffmpeg - yes ID3 tags
video/* ffmpeg - yes title, comment, artist
image/* ffmpeg ocr yes Common EXIF tags, GPS tags
raw, rw2, dng, cr2, crw, dcr, k25, kdc, mrw, pef, xf3, arw, sr2, srf, erf LibRaw no yes Common EXIF tags, GPS tags
ttf,ttc,cff,woff,fnt,otf Freetype2 - yes, bmp Name & style
text/plain libscan yes no -
html, xml libscan yes no -
tar, zip, rar, 7z, ar ... Libarchive yes* - no
docx, xlsx, pptx libscan yes if embedded creator, modified_by, title
doc (MS Word 97-2003) antiword yes no author, title
mobi, azw, azw3 libmobi yes yes author, title
wpd (WordPerfect) libwpd yes no planned
json, jsonl, ndjson libscan yes - -

* See Archive files

Archive files

sist2 will scan files stored into archive files (zip, tar, 7z...) as if they were directly in the file system. Recursive (archives inside archives) scan is also supported.

Limitations:

  • Support for parsing media files with formats that require seek (e.g. .gif, .mp4 w/ fragmented metadata etc.) is limitted (see --mem-buffer option)
  • Archive files are scanned sequentially, by a single thread. On systems where sist2 is not I/O bound, scans might be faster when larger archives are split into smaller parts.

OCR

You can enable OCR support for ebook (pdf,xps,fb2,epub) or image file types with the --ocr-lang <lang> option in combination with --ocr-images and/or --ocr-ebooks. Download the language data files with your package manager (apt install tesseract-ocr-eng) or directly from Github.

The simon987/sist2 image comes with common languages (hin, jpn, eng, fra, rus, spa, chi_sim, deu, pol) pre-installed.

You can use the + separator to specify multiple languages. The language name must be identical to the *.traineddata file installed on your system (use chi_sim rather than chi-sim).

Examples:

sist2 scan --ocr-ebooks --ocr-lang jpn ~/Books/Manga/
sist2 scan --ocr-images --ocr-lang eng ~/Images/Screenshots/
sist2 scan --ocr-ebooks --ocr-images --ocr-lang eng+chi_sim ~/Chinese-Bilingual/

Search backends

sist2 v3.0.7+ supports SQLite search backend. The SQLite search backend has fewer features and generally comparable query performance for medium-size indices, but it uses much less memory and is easier to set up.

SQLite Elasticsearch
Requires separate search engine installation ✓
Memory footprint ~20MB >500MB
Query syntax fts5 query_string
Fuzzy search ✓
Media Types tree real-time updating ✓
Search in file path ✓
Manual tagging ✓ ✓
User scripts ✓
Media Type breakdown for search results ✓

NER

sist2 v3.0.4+ supports named-entity recognition (NER). Simply add a supported repository URL to Configuration > Machine learning options > Model repositories to enable it.

The text processing is done in your browser, no data is sent to any third-party services. See simon987/sist2-ner-models for more details.

List of available repositories:

URL Maintainer Purpose
simon987/sist2-ner-models simon987 General
Screenshot

ner

Build from source

You can compile sist2 by yourself if you don't want to use the pre-compiled binaries

Using docker

git clone --recursive https://github.com/simon987/sist2/
cd sist2
docker build . -t my-sist2-image
# Copy sist2 executable from docker image
docker run --rm --entrypoint cat my-sist2-image /root/sist2 > sist2-x64-linux

Using a linux computer

  1. Install compile-time dependencies

    apt install gcc g++ python3 yasm ragel automake autotools-dev wget libtool libssl-dev curl zip unzip tar xorg-dev libglu1-mesa-dev libxcursor-dev libxml2-dev libxinerama-dev gettext nasm git nodejs
  2. Install vcpkg using my fork: https://github.com/simon987/vcpkg

  3. Install vcpkg dependencies

    vcpkg install curl[core,openssl] sqlite3[core,fts5] cpp-jwt pcre cjson brotli libarchive[core,bzip2,libxml2,lz4,lzma,lzo] pthread tesseract libxml2 libmupdf gtest mongoose libmagic libraw gumbo ffmpeg[core,avcodec,avformat,swscale,swresample,webp]
  4. Build

    git clone --recursive https://github.com/simon987/sist2/
    (cd sist2-vue; npm install; npm run build)
    (cd sist2-admin/frontend; npm install; npm run build)
    cmake -DSIST_DEBUG=off -DCMAKE_TOOLCHAIN_FILE=<VCPKG_ROOT>/scripts/buildsystems/vcpkg.cmake .
    make

More Repositories

1

awesome-datahoarding

List of data-hoarding related tools
1,080
star
2

Much-Assembly-Required

Assembly programming game
Java
930
star
3

od-database

Distributed crawler, database and web frontend for public directories indexing
Python
139
star
4

ngx_http_js_challenge_module

Simple javascript proof-of-work based access for Nginx with virtually no overhead. (Similar to Cloudflare's anti-DDoS feature)
C
61
star
5

Architeuthis

MITM HTTP(S) proxy with integrated load-balancing, rate-limiting and error handling. Built for automated web scraping.
Go
41
star
6

opendirectories-bot

Python
33
star
7

Misc-Download-Scripts

Python
27
star
8

fastimagehash

C/C++ replacement for the 'imagehash' python package
C++
19
star
9

Simple-Incremental-Search-Tool

Simple web frontend to an elasticsearch database made for local files indexing
Python
18
star
10

yt-metadata

Script to import youtube-dl metadata to PostgreSQL
Python
14
star
11

Much-Assembly-Required-Frontend

Files for https://muchassemblyrequired.com/ frontend.
JavaScript
10
star
12

beemer

beemer executes a custom command on files written in the watched directory and deletes it.
Go
8
star
13

imagehash-web

Javascript replacement for the ImageHash python package
JavaScript
6
star
14

task_tracker

Fast task tracker (job queue) with authentication, statistics and web frontend
Go
5
star
15

reddit_feed

Fault-tolerant daemon that fetches comments & submissions from reddit
Python
4
star
16

dataarchivist.net

wip
HTML
3
star
17

vanwanet_scrape

Python requests wrapper with VanwaNet DDoS mitigation bypass (similar to cloudflare-scrape)
Python
3
star
18

chan_feed

Daemon that fetches posts from compatible *chan image boards
Python
3
star
19

sist2-script-clip

sist2 user script to generate CLIP embeddings
Python
3
star
20

bingo

wip toy project, please ignore
Python
3
star
21

status

Minimalist status page
Scala
2
star
22

castget-scripts

castget scripts to automate podcast download & transcoding
Python
2
star
23

opendirectories-bot-2

Reddit bot that interfaces with od-database
Python
2
star
24

sist2-scripts

Python
2
star
25

sist2-build-arm64

Docker image to build sist2 (arm64, tested with raspi 4B)
Dockerfile
2
star
26

sist2-script-whisper

Python
2
star
27

sist2-ner-models

NER models for sist2
Python
2
star
28

sist2-python

Set of python tools to interface with sist2 index files. Used in user scripts
Python
1
star
29

sist2-demo

Scripts for sist2 demo website
Shell
1
star
30

sist2-models

Official sist2 machine learning models
Python
1
star
31

scripts

Shell
1
star
32

cbr2cbz

Yet another cbr to cbz converter
C
1
star
33

ws_feed_adapter

Go
1
star
34

manga-dl

Python
1
star
35

hexlib

Misc utility methods in Python
Python
1
star
36

the-rom.eu

don't ask
HTML
1
star
37

nvidia-tf-lab-docker

Jupyterlab image with nvidia/tensorflow + some other packages
Dockerfile
1
star
38

simon987.net

Personal website
JavaScript
1
star
39

sist2-build

Docker image to build sist2
Dockerfile
1
star
40

task_tracker_drone

General purpose 'set and forget' task runner for task_tracker
Python
1
star
41

ffmpeg-thumbnail-size-viz

Python
1
star
42

feed_viz

JavaScript
1
star
43

music-graph-scripts

Utility scripts for music-graph
Python
1
star
44

pg_asciifold

asciifold C-Language function based on Lucene's ASCIIFoldingFilter
C
1
star
45

wacom-config

Config for wacom tablet mapping on linux
Shell
1
star
46

fastimagehash-go

go bindings for libfastimagehash
Go
1
star