mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 19:17:13 -05:00 
			
		
		
		
	Updated docs for new hook feature
This commit is contained in:
		
							parent
							
								
									cb2df58b27
								
							
						
					
					
						commit
						3827c52194
					
				@ -3,6 +3,8 @@ Changelog
 | 
			
		||||
 | 
			
		||||
* 0.2.0
 | 
			
		||||
 | 
			
		||||
  * `#81`_: Added a hook to run an arbitrary script after every document is
 | 
			
		||||
    consumed.
 | 
			
		||||
  * `#98`_: Added optional environment variables for ImageMagick so that it
 | 
			
		||||
    doesn't explode when handling Very Large Documents or when it's just
 | 
			
		||||
    running on a low-memory system.  Thanks to `Florian Harr`_ for his help on
 | 
			
		||||
 | 
			
		||||
@ -48,14 +48,21 @@ Just write a script, put it somewhere that Paperless can read & execute, and
 | 
			
		||||
then put the path to that script in ``paperless.conf`` with the variable name
 | 
			
		||||
``PAPERLESS_POST_CONSUME_SCRIPT``.
 | 
			
		||||
 | 
			
		||||
.. important::
 | 
			
		||||
 | 
			
		||||
    This script is executed in a **blocking** process, which means that if the
 | 
			
		||||
    script takes a long time to run, it can significantly slow down your
 | 
			
		||||
    document consumption flow.  If you want things to run asynchronously,
 | 
			
		||||
    you'll have to fork the process in your script and exit.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.. _consumption-directory-hook-variables
 | 
			
		||||
 | 
			
		||||
What Can This Script Do?
 | 
			
		||||
........................
 | 
			
		||||
 | 
			
		||||
It's your script, so you're limited by own imagination and the laws of physics.
 | 
			
		||||
However, the following values are passed to the script in order:
 | 
			
		||||
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:
 | 
			
		||||
 | 
			
		||||
* Document id
 | 
			
		||||
* Generated file name
 | 
			
		||||
 | 
			
		||||
@ -34,8 +34,8 @@ PAPERLESS_SHARED_SECRET=""
 | 
			
		||||
 | 
			
		||||
# After a document is consumed, Paperless can trigger an arbitrary script if
 | 
			
		||||
# you like.  This script will be passed a number of arguments for you to work
 | 
			
		||||
# with.  For more information, please see the documentation.  The default is
 | 
			
		||||
# blank, which means nothing will be executed.
 | 
			
		||||
# with.  The default is blank, which means nothing will be executed.  For more
 | 
			
		||||
# information, take a look at the docs: http://paperless.readthedocs.org/en/latest/consumption.html#hooking-into-the-consumption-process
 | 
			
		||||
#PAPERLESS_POST_CONSUME_SCRIPT="/path/to/an/arbitrary/script.sh"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user