Code Monkey home page Code Monkey logo

Comments (2)

danielquinn avatar danielquinn commented on May 22, 2024

I think you're misunderstanding the whole file-naming thing, so I'll try to explain. If it turns out that it's me that's missing something, please set me right.

The name of the file only comes into play at two points in time:

  • During consumption, the consumer tries to guess the sender, title, and tags based on the file name. If the name matches the expected pattern, the database is updated with these values.
  • During Export, the files are saved to an empty directory and named according to the same convention used during import.

Importantly, Paperless only really operates between those two stages. That is to say, if you import a document called MyPrefix123.pdf, it'll do the following:

  • OCR the document and put the text into the database with the following metadata:
    • Title: MyPrefix123
    • File Type: pdf
    • Sender: None
    • Tags: assigned based on the auto-tagging rules you define in the admin interface
  • Encrypt the file and save it to the media/documents/ directory using the primary key as the file name, so the stored file will look like this: media/documents/0000156.pdf.gpg.

There's currently no logic in Paperless that would allow it to guess the sender and title based on the contents of the document and frankly, I wouldn't know where to start to make that happen. So, if you're doing a mass-import, I'd recommend trying to do what you can with the file names before the import rather than trying to use the admin to change them all after they've been imported.

I've been considering some form of a bulk-editing feature. Something that'd let you assign a sender, title, or tag to a group of documents, but that's a way's off, since it'd be part of the new UI.

Another solution might be to use the same logic I've got on the tags, and apply it to senders: allow users to define matching algorithms (if document contains the word 'T-Mobile', set sender='T-Mobile'), so that might help you get part-way there, but this wouldn't solve the title problem, since in most cases, while you may have many documents with the same sender, you're unlikely to have the same happen with titles.

So does that help at all?

from paperless.

wsuff avatar wsuff commented on May 22, 2024

Wow. Thanks for the in-depth response. It reconfirms what I expected that I'll need to name files prior to document consumption if at all possible.

Very well said to be honest. Paperless was easy to get setup with the Scan to FTP directly but I guess I overlooked that there was no easy way to name the files with some intervention or additional steps.

Glad I asked tho since it helped understand how it's used and potential solutions.

from paperless.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.