Commit Graph

35 Commits

Author SHA1 Message Date
Christian Krakau-Louis 4c95e6ec6c Update imap_tasks.py
Refactor IMAP Tasks: Filter Allowed Attachment Types & Improve Code Quality

- Filter attachments to process only office files, PDFs, plain text, CSV, and RTF,
  explicitly skipping common image MIME types.
- Use an explicit elif for clarity in attachment processing logic.
- Remove dead code by not reassigning the result of fetch_attachments_and_enqueue.
- Reformat log messages, docstrings, and break long lines to comply with PEP 8.
- Add clarifying comments for excluded image MIME types.
2025-03-13 02:08:21 +01:00
Christian Krakau-Louis 473ae3a20a Update imap_tasks.py
Added some filtering for file types to avoid your usual image attachment to trigger a conversion task and clutter my documents
2025-03-13 01:51:46 +01:00
Christian Krakau-Louis 8848fece2f added correct endpoints and file type detection 2025-02-19 14:14:49 +01:00
Christian Krakau-Louis c40e9f034e Added better GMail handling and multi file type support 2025-02-19 14:03:29 +01:00
Christian Krakau-Louis 2241c1de6c fixed errors 2025-02-18 04:36:04 +01:00
Christian Krakau-Louis f234a55b52 Added locking for IMAP tasks 2025-02-18 04:29:33 +01:00
Christian Krakau-Louis 03ac92d931 Only process unread mail 2025-02-18 03:55:29 +01:00
Christian Krakau-Louis 3ebedbb016 Added better IMAP handling 2025-02-18 03:39:29 +01:00
Christian Krakau-Louis de7050a162 Shorter pull period for mails, added a bit of different handling for paperless 2025-02-18 03:09:54 +01:00
Christian Krakau-Louis c0c5ca3a67 Merge branch 'main' of https://github.com/christianlouis/document-processor 2025-02-14 23:23:38 +01:00
Christian Krakau-Louis 17fc8fae17 restore unread 2025-02-14 23:23:24 +01:00
Christian Krakau-Louis 65beea89cf First try for Azure API 2025-02-14 22:49:22 +01:00
Christian Krakau-Louis 99684f9650 added skipping for mail without attachments and already processed mail 2025-02-14 16:22:43 +01:00
Christian Krakau-Louis 40fe288230 Added text detection in upload_to_s3 2025-02-14 12:00:44 +01:00
Christian Krakau-Louis b42b395915 removed .env from dir and added README and demo env file 2025-02-12 12:12:29 +01:00
Christian Krakau-Louis 937b8018f8 made paperless upload more robust 2025-02-12 02:56:28 +01:00
Christian Krakau-Louis 70fb539b7b putting it all together 2025-02-12 02:26:41 +01:00
Christian Krakau-Louis 430c4258ed added optional in config 2025-02-12 01:59:26 +01:00
Christian Krakau-Louis 5a834ff690 added IMAP pull 2025-02-12 01:54:41 +01:00
Christian Krakau-Louis 5d0f9d8e58 fixes to paperless #2 2025-02-12 01:05:42 +01:00
Christian Krakau-Louis 86f449f1bc Fixed extraction of document ID 2025-02-12 00:56:04 +01:00
Christian Krakau-Louis e75058a80b upload to paperless, first try 2025-02-12 00:43:32 +01:00
Christian Krakau-Louis 42148c50bc added initial Dropbox code 2025-02-12 00:03:58 +01:00
Christian Krakau-Louis c21f683c0f changed nextcloud code 2025-02-11 23:42:19 +01:00
Christian Krakau-Louis de9809feaf Nextcloud Upload 2025-02-11 23:31:18 +01:00
Christian Krakau-Louis e601392a29 Fixed directory default for processing 2025-02-11 23:13:14 +01:00
Christian Krakau-Louis cdc6e976a8 Add APIs to upload to various destinations - dummy code first 2025-02-11 23:11:21 +01:00
Christian Krakau-Louis fb217a8d8f Changed to workdir variable 2025-02-11 22:01:42 +01:00
Christian Krakau-Louis 1ad9425102 Added first working version of the code. Processes
PDF files, no upload yet.
2025-02-11 19:42:23 +01:00
Christian Krakau-Louis 22f8f60f12 Create tasks.py 2025-02-09 16:22:39 +01:00
Christian Krakau-Louis 527c6c86ff Create celery_worker.py 2025-02-09 16:22:24 +01:00
Christian Krakau-Louis dff0be2b1d Create models.py 2025-02-09 16:22:07 +01:00
Christian Krakau-Louis a924fe9f9e Create database.py 2025-02-09 16:20:56 +01:00
Christian Krakau-Louis 6f4eba73d0 Create config.py 2025-02-09 16:20:42 +01:00
Christian Krakau-Louis 3a0949d79d Create main.py 2025-02-09 16:20:26 +01:00