Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
|\.github/publish\.yaml
)$
- repo: https://github.com/sbrunner/jsonschema2md2
rev: 1.5.2
rev: 1.6.1
hooks:
- id: jsonschema2md
files: schema.json
Expand Down Expand Up @@ -63,7 +63,7 @@ repos:
- id: workflows-require-timeout
- id: poetry2-lock
additional_dependencies:
- poetry==2.1.3 # pypi
- poetry==2.1.4 # pypi
- id: canonicalize
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
Expand All @@ -77,13 +77,13 @@ repos:
hooks:
- id: prettier
additional_dependencies:
- prettier@3.5.3 # npm
- prettier-plugin-sh@0.17.4 # npm
- prettier@3.6.2 # npm
- prettier-plugin-sh@0.18.0 # npm
- prettier-plugin-toml@2.0.6 # npm
- '@prettier/plugin-xml@0.12.0' # npm
exclude: ^scan_to_paperless/status\.html$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
rev: v0.11.0.1
hooks:
- id: shellcheck
- repo: https://github.com/jumanjihouse/pre-commit-hooks
Expand Down Expand Up @@ -114,7 +114,7 @@ repos:
)

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.11.12
rev: v0.12.8
hooks:
- id: ruff-format
args:
Expand All @@ -140,8 +140,8 @@ repos:
additional_dependencies:
- prospector-profile-duplicated==1.10.5 # pypi
- prospector-profile-utils==1.26.1 # pypi
- pylint[spelling]==3.3.7 # pypi
- ruff==0.11.12 # pypi
- pylint[spelling]==3.3.8 # pypi
- ruff==0.12.8 # pypi
- id: prospector
args:
- --die-on-tool-error
Expand Down
8 changes: 4 additions & 4 deletions ci/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
c2cciutils==1.7.3
poetry==2.1.3
poetry-dynamic-versioning==1.8.2
poetry==2.1.4
poetry-dynamic-versioning==1.9.1
poetry-plugin-export==1.9.0
pip==25.1.1
pre-commit==4.2.0
pip==25.2
pre-commit==4.3.0
importlib-metadata<8.7.1
tag-publish==1.1.1
2 changes: 1 addition & 1 deletion ci/schema-copy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def _main() -> None:
with Path("scan_to_paperless/process_schema.json").open("w", encoding="utf-8") as process_schema_file:
json.dump(process_schema, process_schema_file, indent=2)

subprocess.run( # noqa: S603
subprocess.run(
["pre-commit", "run", "--color=never", "--files=scan_to_paperless/process_schema.json", "prettier"], # noqa: S607
check=False,
)
Expand Down
6 changes: 3 additions & 3 deletions config.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
- <a id="definitions/auto_mask/properties/buffer_level"></a>**`buffer_level`** _(integer)_: The threshold level used in buffer on the blurry image. Default: `20`.
- <a id="definitions/args"></a>**`args`** _(object)_: Cannot contain additional properties.
- <a id="definitions/args/properties/level"></a>**`level`** _(object)_: The level configuration.
- <a id="definitions/args/properties/level/properties/value"></a>**`value`** _(['boolean', 'integer'])_: true: => do level on 15% - 85% (under 15 % will be black above 85% will be white), false: => 0% - 100%, <number>: => (0 + <number>)% - (100 - number)%. Default: `false`.
- <a id="definitions/args/properties/level/properties/value"></a>**`value`** _(boolean or integer)_: true: => do level on 15% - 85% (under 15 % will be black above 85% will be white), false: => 0% - 100%, <number>: => (0 + <number>)% - (100 - number)%. Default: `false`.
- <a id="definitions/args/properties/level/properties/auto"></a>**`auto`** _(boolean)_: If no level specified, do auto level. Default: `false`.
- <a id="definitions/args/properties/level/properties/min"></a>**`min`** _(number)_: Min level if no level end no auto-level. Default: `0`.
- <a id="definitions/args/properties/level/properties/max"></a>**`max`** _(number)_: Max level if no level end no auto-level. Default: `100`.
Expand Down Expand Up @@ -97,11 +97,11 @@
- <a id="definitions/args/properties/mask"></a>**`mask`** _(object)_: The mask configuration, the a is used to mask the image on crop and skew calculation. Default: `{"enabled": false}`.
- <a id="definitions/args/properties/mask/properties/enabled"></a>**`enabled`** _(boolean)_: Enable the mask. Default: `true`.
- <a id="definitions/args/properties/mask/properties/auto_mask"></a>**`auto_mask`**: Refer to _[#/definitions/auto_mask](#definitions/auto_mask)_.
- <a id="definitions/args/properties/mask/properties/additional_filename"></a>**`additional_filename`** _(['string', 'null'])_: An image file used to add on the mask.
- <a id="definitions/args/properties/mask/properties/additional_filename"></a>**`additional_filename`** _(string or null)_: An image file used to add on the mask.
- <a id="definitions/args/properties/cut"></a>**`cut`** _(object)_: The cut configuration, a mask is used to definitively mask the source image. Default: `{"enabled": false}`.
- <a id="definitions/args/properties/cut/properties/enabled"></a>**`enabled`** _(boolean)_: Enable the cut. Default: `true`.
- <a id="definitions/args/properties/cut/properties/auto_mask"></a>**`auto_mask`**: Refer to _[#/definitions/auto_mask](#definitions/auto_mask)_.
- <a id="definitions/args/properties/cut/properties/additional_filename"></a>**`additional_filename`** _(['string', 'null'])_: An image file used to add on the mask.
- <a id="definitions/args/properties/cut/properties/additional_filename"></a>**`additional_filename`** _(string or null)_: An image file used to add on the mask.
- <a id="definitions/args/properties/no_remove_to_continue"></a>**`no_remove_to_continue`** _(boolean)_: Don't wait for the deletion of the REMOVE_TO_CONTINUE file before exporting the PDF. Default: `false`.
- <a id="definitions/args/properties/deskew"></a>**`deskew`** _(object)_: The deskew configuration.
- <a id="definitions/args/properties/deskew/properties/min_angle"></a>**`min_angle`** _(number)_: The minimum angle to detect the image skew [degree]. Default: `-45`.
Expand Down
12 changes: 6 additions & 6 deletions process.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

- <a id="properties/images"></a>**`images`** _(array, required)_: The images.
- <a id="properties/images/items"></a>**Items** _(string)_
- <a id="properties/args"></a>**`args`**: Refer to _[#/definitions/args](#definitions/args)_.
- <a id="properties/args"></a>**`args`** _(required)_: Refer to _[#/definitions/args](#definitions/args)_.
- <a id="properties/progress"></a>**`progress`** _(boolean)_: Run in progress mode. Default: `false`.
- <a id="properties/steps"></a>**`steps`** _(array)_: The carried out steps description.
- <a id="properties/steps/items"></a>**Items** _(object)_: Cannot contain additional properties.
Expand All @@ -16,7 +16,7 @@
- <a id="properties/assisted_split/items"></a>**Items** _(object)_: Assisted split configuration. Cannot contain additional properties.
- <a id="properties/assisted_split/items/properties/source"></a>**`source`** _(string)_
- <a id="properties/assisted_split/items/properties/destinations"></a>**`destinations`** _(array)_
- <a id="properties/assisted_split/items/properties/destinations/items"></a>**Items** _(['integer', 'string'])_
- <a id="properties/assisted_split/items/properties/destinations/items"></a>**Items** _(integer or string)_
- <a id="properties/assisted_split/items/properties/image"></a>**`image`** _(string)_
- <a id="properties/assisted_split/items/properties/limits"></a>**`limits`** _(array)_: The (proposed) limits to do the assisted split, You should keep only the right one.
- <a id="properties/assisted_split/items/properties/limits/items"></a>**Items** _(object)_: Cannot contain additional properties.
Expand All @@ -34,7 +34,7 @@
- <a id="properties/intermediate_error/items/properties/traceback/items"></a>**Items** _(string)_
- <a id="properties/images_config"></a>**`images_config`** _(object)_: Can contain additional properties.
- <a id="properties/images_config/additionalProperties"></a>**Additional properties** _(object)_: Cannot contain additional properties.
- <a id="properties/images_config/additionalProperties/properties/angle"></a>**`angle`** _(['number', 'null'])_: The used angle to deskew, can be change, restart by deleting one of the generated images.
- <a id="properties/images_config/additionalProperties/properties/angle"></a>**`angle`** _(number or null)_: The used angle to deskew, can be change, restart by deleting one of the generated images.
- <a id="properties/images_config/additionalProperties/properties/status"></a>**`status`** _(object)_: Cannot contain additional properties.
- <a id="properties/images_config/additionalProperties/properties/status/properties/angle"></a>**`angle`** _(number)_: The measured deskew angle.
- <a id="properties/images_config/additionalProperties/properties/status/properties/size"></a>**`size`** _(array)_: The image dimensions.
Expand Down Expand Up @@ -62,7 +62,7 @@
- <a id="definitions/auto_mask/properties/buffer_level"></a>**`buffer_level`** _(integer)_: The threshold level used in buffer on the blurry image. Default: `20`.
- <a id="definitions/args"></a>**`args`** _(object)_
- <a id="definitions/args/properties/level"></a>**`level`** _(object)_: The level configuration.
- <a id="definitions/args/properties/level/properties/value"></a>**`value`** _(['boolean', 'integer'])_: true: => do level on 15% - 85% (under 15 % will be black above 85% will be white), false: => 0% - 100%, <number>: => (0 + <number>)% - (100 - number)%. Default: `false`.
- <a id="definitions/args/properties/level/properties/value"></a>**`value`** _(boolean or integer)_: true: => do level on 15% - 85% (under 15 % will be black above 85% will be white), false: => 0% - 100%, <number>: => (0 + <number>)% - (100 - number)%. Default: `false`.
- <a id="definitions/args/properties/level/properties/auto"></a>**`auto`** _(boolean)_: If no level specified, do auto level. Default: `false`.
- <a id="definitions/args/properties/level/properties/min"></a>**`min`** _(number)_: Min level if no level end no auto-level. Default: `0`.
- <a id="definitions/args/properties/level/properties/max"></a>**`max`** _(number)_: Max level if no level end no auto-level. Default: `100`.
Expand Down Expand Up @@ -117,11 +117,11 @@
- <a id="definitions/args/properties/mask"></a>**`mask`** _(object)_: The mask configuration, the a is used to mask the image on crop and skew calculation. Default: `{"enabled": false}`.
- <a id="definitions/args/properties/mask/properties/enabled"></a>**`enabled`** _(boolean)_: Enable the mask. Default: `true`.
- <a id="definitions/args/properties/mask/properties/auto_mask"></a>**`auto_mask`**: Refer to _[#/definitions/auto_mask](#definitions/auto_mask)_.
- <a id="definitions/args/properties/mask/properties/additional_filename"></a>**`additional_filename`** _(['string', 'null'])_: An image file used to add on the mask.
- <a id="definitions/args/properties/mask/properties/additional_filename"></a>**`additional_filename`** _(string or null)_: An image file used to add on the mask.
- <a id="definitions/args/properties/cut"></a>**`cut`** _(object)_: The cut configuration, a mask is used to definitively mask the source image. Default: `{"enabled": false}`.
- <a id="definitions/args/properties/cut/properties/enabled"></a>**`enabled`** _(boolean)_: Enable the cut. Default: `true`.
- <a id="definitions/args/properties/cut/properties/auto_mask"></a>**`auto_mask`**: Refer to _[#/definitions/auto_mask](#definitions/auto_mask)_.
- <a id="definitions/args/properties/cut/properties/additional_filename"></a>**`additional_filename`** _(['string', 'null'])_: An image file used to add on the mask.
- <a id="definitions/args/properties/cut/properties/additional_filename"></a>**`additional_filename`** _(string or null)_: An image file used to add on the mask.
- <a id="definitions/args/properties/no_remove_to_continue"></a>**`no_remove_to_continue`** _(boolean)_: Don't wait for the deletion of the REMOVE_TO_CONTINUE file before exporting the PDF. Default: `false`.
- <a id="definitions/args/properties/deskew"></a>**`deskew`** _(object)_: The deskew configuration.
- <a id="definitions/args/properties/deskew/properties/min_angle"></a>**`min_angle`** _(number)_: The minimum angle to detect the image skew [degree]. Default: `-45`.
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
poetry==2.1.3
poetry==2.1.4
poetry-dynamic-versioning==1.8.2
poetry-plugin-export==1.9.0
pip==25.1.1
2 changes: 1 addition & 1 deletion scan_to_paperless/process_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def crop_image(
matrix: NpNdarrayInt = np.array([[1.0, 0.0, -x], [0.0, 1.0, -y]])
return cast(
"NpNdarrayInt",
cv2.warpAffine(image, matrix, ((round(width)), (round(height))), borderValue=background),
cv2.warpAffine(image, matrix, ((width), (height)), borderValue=background),
)


Expand Down
Loading