mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Added the passphrase to the consume hook and fixed the docs for it
This commit is contained in:
		@@ -64,6 +64,8 @@ What Can This Script Do?
 | 
				
			|||||||
It's your script, so you're only limited by your imagination and the laws of
 | 
					It's your script, so you're only limited by your imagination and the laws of
 | 
				
			||||||
physics.  However, the following values are passed to the script in order:
 | 
					physics.  However, the following values are passed to the script in order:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					* The value of ``PAPERLESS_PASSPHRASE``, which is used to encrypt your
 | 
				
			||||||
 | 
					  documents
 | 
				
			||||||
* Document id
 | 
					* Document id
 | 
				
			||||||
* Generated file name
 | 
					* Generated file name
 | 
				
			||||||
* Source path
 | 
					* Source path
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,12 +64,13 @@ def run_external_script(sender, document, **kwargs):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    Popen((
 | 
					    Popen((
 | 
				
			||||||
        settings.POST_CONSUME_SCRIPT,
 | 
					        settings.POST_CONSUME_SCRIPT,
 | 
				
			||||||
 | 
					        settings.PASSPHRASE,
 | 
				
			||||||
 | 
					        str(document.id),
 | 
				
			||||||
        document.file_name,
 | 
					        document.file_name,
 | 
				
			||||||
        document.source_path,
 | 
					        document.source_path,
 | 
				
			||||||
        document.thumbnail_path,
 | 
					        document.thumbnail_path,
 | 
				
			||||||
        document.download_url,
 | 
					        document.download_url,
 | 
				
			||||||
        document.thumbnail_url,
 | 
					        document.thumbnail_url,
 | 
				
			||||||
        str(document.id),
 | 
					 | 
				
			||||||
        str(document.correspondent),
 | 
					        str(document.correspondent),
 | 
				
			||||||
        str(",".join(document.tags.all().values_list("slug", flat=True)))
 | 
					        str(",".join(document.tags.all().values_list("slug", flat=True)))
 | 
				
			||||||
    )).wait()
 | 
					    )).wait()
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user