Crates.io | dmslite |
lib.rs | dmslite |
version | 0.1.2 |
source | src |
created_at | 2024-03-09 12:51:21.931052 |
updated_at | 2024-03-09 13:16:26.822472 |
description | Local and fast Document Management System CLI-tool for storing and searching PDF documents. |
homepage | |
repository | https://github.com/lennart-rth/DMSLite |
max_upload_size | |
id | 1167797 |
size | 74,184 |
DMSLite is a secure and lightweight command-line tool for document management. It provides efficient document indexing, searching, and AI-based categorization, ensuring fast performance even with large document volumes, all while keeping operations entirely local on your machine for maximum privacy and security.
If your roots bin folder is in $PATH you can type dmslite
everywhere to:
c
)s
followed by the search phrase)o
followed by the id found out by a search before)d
followed by the id found out by a prior search.)cargo install dmslite
sudo apt install poppler-utils
) psql -U postgres
CREATE DATABASE dmslite OWNER dmslite;
CREATE SCHEMA dmslite;
src/settings.rs
in the String PSQL_PASSWD
CREATE EXTENSION pg_trgm;
-- create indices
CREATE INDEX idx_content_trgm ON document_content USING gin (content gin_trgm_ops);
CREATE INDEX idx_summary_trgm ON document_content USING gin (summary gin_trgm_ops);
CREATE INDEX idx_buzzwords_trgm ON document_content USING gin (buzzwords gin_trgm_ops);
-- create tables
CREATE TABLE dmslite.main_table (
id SERIAL PRIMARY KEY,
upload_date DATE,
filepath VARCHAR(255),
title TEXT
);
CREATE TABLE dmslite.document_content (
id SERIAL PRIMARY KEY,
-- Other columns in table2
content TEXT,
summary TEXT,
buzzwords TEXT,
-- Add more columns as needed
FOREIGN KEY (id) REFERENCES main_table(id) ON DELETE CASCADE
);
Build custom Ollama models:
For Memory restricted machines the gemma:2b Model is recommended (Default).
Otherwise Choose llama2.
Set this inside the Modelfiles as the FROM <model> Command.
```
ollama create doc_buzzword_generator -f doc_buzzword_generator
ollama create doc_summarizer -f doc_summarizer
ollama create doc_title_generator -f doc_title_generator
```
CONSUME_PATH
and STORAGE_PATH
in the file src/settings.rs
. /home/<user>/...
TESSERACT_LANG
to your tesseract Language flag. (E.g. "eng" or "deu")DROP TABLE document_content;
DROP TABLE main_table;
DROP INDEX IF EXISTS idx_content_trgm;
DROP INDEX IF EXISTS idx_summary_trgm;
DROP INDEX IF EXISTS idx_buzzwords_trgm;
DROP FUNCTION fuzzy_search_document_content;
ollama rm doc_buzzword_generator
ollama rm doc_summarizer
ollama rm doc_title_generator