[pp:hash] add 'hash' post processor (#6099)
This commit is contained in:
@@ -5586,6 +5586,63 @@ Description
|
||||
See `metadata.event`_ for a list of available events.
|
||||
|
||||
|
||||
hash.chunk-size
|
||||
---------------
|
||||
Type
|
||||
``integer``
|
||||
Default
|
||||
``32768``
|
||||
Description
|
||||
Number of bytes read per chunk during file hash computation.
|
||||
|
||||
|
||||
hash.event
|
||||
----------
|
||||
Type
|
||||
* ``string``
|
||||
* ``list`` of ``strings``
|
||||
Default
|
||||
``"file"``
|
||||
Description
|
||||
The event(s) for which `file hashes <hash.hashes_>`__ are computed.
|
||||
|
||||
See `metadata.event`_ for a list of available events.
|
||||
|
||||
|
||||
hash.filename
|
||||
-------------
|
||||
Type
|
||||
* ``bool``
|
||||
Default
|
||||
``false``
|
||||
Description
|
||||
Rebuild `filenames <extractor.*.filename_>`__ after computing
|
||||
`hash digests <hash.hashes_>`__ and adding them to the metadata dict.
|
||||
|
||||
|
||||
hash.hashes
|
||||
-----------
|
||||
Type
|
||||
* ``string``
|
||||
* ``object`` (`field name` -> `hash algorithm`)
|
||||
Default
|
||||
``"md5,sha1"``
|
||||
Example
|
||||
.. code:: json
|
||||
|
||||
"sha256:hash_sha,sha3_512:hash_sha3"
|
||||
|
||||
.. code:: json
|
||||
|
||||
{
|
||||
"hash_sha" : "sha256",
|
||||
"hash_sha3": "sha3_512"
|
||||
}
|
||||
|
||||
Description
|
||||
Hash digests to compute.
|
||||
|
||||
|
||||
metadata.mode
|
||||
-------------
|
||||
Type
|
||||
@@ -6694,6 +6751,8 @@ Description
|
||||
| (requires `downloader.*.part`_ = ``true`` and `extractor.*.skip`_ = ``false``)
|
||||
``exec``
|
||||
Execute external commands
|
||||
``hash``
|
||||
Compute file hash digests
|
||||
``metadata``
|
||||
Write metadata to separate files
|
||||
``mtime``
|
||||
|
||||
Reference in New Issue
Block a user