Skip to content

A plugin that integrates semantic search behavior into Paperless-ngx.

Notifications You must be signed in to change notification settings

afiorillo/paperless-hook-bart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paperless Hook BART

This is a proof of concept to show that BART can be used to enhance search in Paperless-ngx. It originates from the proposal discussion here.

Usage

This project is experimental, so expect rough edges. Currently you can run the script by preparing the development environment (poetry install, documented below) and running

# you must provide credentials to access the paperless server
# see https://docs.paperless-ngx.com/api/#authorization for details
# go to "$PAPERLESS_BASE_URL/admin/authtoken/tokenproxy/" to create a token
export PAPERLESS_BASE_URL="http://..."
export PAPERLESS_TOKEN="abcd1234..."
# the hook provides a DOCUMENT_ID to specify which document was just consumed
export DOCUMENT_ID="1"
# and finally, you can run the hook
poetry run post_consume_script

Note: this will almost certainly have to change to improve portability.

Developing

This project uses Python 3.11+ and Poetry. Assuming you have these installed, preparing the developing environment should just be:

poetry install

You can run the unit tests with

pytest tests/

About

A plugin that integrates semantic search behavior into Paperless-ngx.

Topics

Resources

Stars

Watchers

Forks

Languages