Code Monkey home page Code Monkey logo

Comments (12)

danielquinn avatar danielquinn commented on May 22, 2024

The sticky part is the consumer. I wrote it entirely expecting a PDF-only setup, but I've started on a branch called feature/images-as-docs to see if I can make it work.

As for an API (as in, a URL you can post to?), that's probably not a lot of trouble. I'll see if I can roll that in too.

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

Actually, the more I think of this, the more I don't like the idea of an HTTP POST, but prefer something simpler like email:

  1. You take a picture of a receipt
  2. Send it by mail to [email protected]
  3. The consumer script polls that account using the imap module looking for attachments
  4. If one is found, it consumes it like any other document.

What do you think?

from paperless.

the01 avatar the01 commented on May 22, 2024

But if you were to just download the posted pic (via api) to the consume folder you would have the same setup (assuming you detect imgs as well as pdfs from your directory) as rigth now, with additional functionality without much extra work (see rest api etc.). The same stuff could be used for consuming a mail client. Though in my experience it is far easier to add another rest api than adding a whole mail client (especially if you want to support more than just gmail)

I guess the deciding factor is whether you want to add receipts from on the way and don't want/have an internet facing server to accept the rest requests..

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

The thing about a RESTful API is that you need a client then. Take this user case as an example:

  • You're out for dinner and want to capture the receipt
  • You pull out your phone, take a photo
  • You wan to send it to your paperless server, but how?
    • You don't have an app that can capture it and send a POST
    • You could visit a web page maybe and submit it directly via a form
    • You do have a mail client though
  • Open your mail client, attach the image, put some title & sender info in the message body and hit "send".
  • The Paperless consumer indexes the file directly from a mailbox

I can add an API of course, but I'm not sure I see a use case for it if this mail thing works out.

from paperless.

avichalp avatar avichalp commented on May 22, 2024

I think mail thing is a good option to consider but if we make a REST API someone can make an app using that API which can upload receipt images.

What you guys think ?

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

So long as the someone building the app isn't me, I'm cool with it :-) I can add a simple REST service. I'll make it part of the branch I'm working on.

from paperless.

the01 avatar the01 commented on May 22, 2024

What I've mentioned above, if the api and mail work by saving the received receipt img to the consume folder, you won't need much specialized code (and have the possibility to add more in the future).

I think a simple webpage for file upload shouldn't be too difficult and from there one could use somethink like phonegap to create simple ios/android apps from there

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

This all sounds good by me, save for the fact that exposing a REST API means putting Paperless on a publicly-facing machine -- something I try to avoid if I don't need it. But rolling a simple POST view into Paperless isn't too tough. I'll do what I can.

In the mean time, I'm working on the mail component outlined here and it's about 80% done. The tricky part is actually parsing the email and pulling out an attachment, but I've found a few resources that're making this less painful.

from paperless.

the01 avatar the01 commented on May 22, 2024

I agree! But you can always use the api from inside your network as well. (e.g. to upload from other devices into a central application)

I think I have played with that some time ago, if you need some assitance, let me know!

from paperless.

DavidVentura avatar DavidVentura commented on May 22, 2024

I like the idea about putting stuff directly into the consume folder, particularly images. We have set up multiple scanners (for receipts) that feed their output as images to a single,shared directory (all in LAN).. consuming from that would be perfect for me. I don't need the POST API (email is very useful, I hadn't thought about that) but consuming images from a directory is perfect

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

I've been working on this feature for a little over a week now, and while I'm not yet ready to push it into master yet (needs lots more testing) those of you interested in fiddling with it or checking it out can take a look at the images-as-docs branch.

from paperless.

danielquinn avatar danielquinn commented on May 22, 2024

I've just merged the great big branch that includes image support and a crude API. Details are in the changelog.

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.