censor/Censor
1
37
Fork
You've already forked Censor
3

feat: redact links and widgets #151

Merged
mahlzahn merged 8 commits from mahlzahn/feat_redact_links_and_widgets into main 2026年03月17日 19:57:35 +01:00 AGit
  • impemented removal of links and widgets (form fields, signatures, etc.), when their rectangles overlap with any redaction rectangle
  • refactored to use PyMuPDF function for annotation removal
  • fixed automatic submodule update

Closes: #98

- impemented removal of links and widgets (form fields, signatures, etc.), when their rectangles overlap with any redaction rectangle - refactored to use PyMuPDF function for annotation removal - fixed automatic submodule update Closes: #98
Remove links and widgets (form fields, signatures, etc.), when their rectangles overlap with any redaction rectangle.
Closes: #98 
fix(i18n): add more verbose explanation of widgets
Some checks are pending
/ checks (pull_request) Waiting to run
/ build-start (pull_request_target) Successful in 17s
/ release-prepare (pull_request_target) Has been skipped
/ merge-conditions (pull_request) Successful in 7s
7005c0a0b8
censor-bot approved these changes 2026年03月17日 14:53:58 +01:00
Dismissed
mahlzahn added this to the v0.6.0 milestone 2026年03月17日 14:57:20 +01:00
mahlzahn dismissed censor-bot's review 2026年03月17日 15:05:48 +01:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

chore: merge main into feat_redact_links_and_widgets
All checks were successful
/ merge-conditions (pull_request) Successful in 8s
/ build-start (pull_request_target) Successful in 13s
/ checks (pull_request) Successful in 1m15s
2f56de3c76
censor-bot approved these changes 2026年03月17日 15:06:42 +01:00
Dismissed
@ -63,0 +60,4 @@
def redact_links(mupdf_page: pymupdf.Page):
# This should not raise an exception, but it does sometimes
Author
Owner
Copy link

Instead of being limited by #134, maybe just use redaction rectangles as additional input argument?

Instead of being limited by #134, maybe just use redaction rectangles as additional input argument?
Author
Owner
Copy link

Done in 1b19dad419.

Done in 1b19dad419c94dcfc592e961ab222f4d2b98b407.
mahlzahn marked this conversation as resolved
@ -228,1 +222,4 @@
sep='\n')
# No links on any page
links = page.mupdf_page.get_links()
assert len(links) == 0, print(page, links, sep='\n')
Author
Owner
Copy link

add test for one remaining link on second page for beautiful.pdf

add test for one remaining link on second page for `beautiful.pdf`
Author
Owner
Copy link
Done in https://codeberg.org/censor/Censor/pulls/151/commits/2219c2e2cdbac8e58dbcea2feb4b9629ec78fca8.
mahlzahn marked this conversation as resolved
mahlzahn dismissed censor-bot's review 2026年03月17日 17:19:43 +01:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

chore(test): add test for link removal on beautiful.pdf
All checks were successful
/ merge-conditions (pull_request) Successful in 8s
/ build-start (pull_request_target) Successful in 10s
/ checks (pull_request) Successful in 1m11s
2219c2e2cd
censor-bot approved these changes 2026年03月17日 17:20:42 +01:00
Dismissed
mahlzahn dismissed censor-bot's review 2026年03月17日 19:43:07 +01:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

Related: #134 
chore(ci): fix automated submodule update
Some checks failed
/ merge-conditions (pull_request) Successful in 9s
/ build-start (pull_request_target) Successful in 11s
/ checks (pull_request) Failing after 56s
c6e21d175d
censor-bot approved these changes 2026年03月17日 19:43:56 +01:00
Dismissed
mahlzahn dismissed censor-bot's review 2026年03月17日 19:49:31 +01:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

fix: import redaction
All checks were successful
/ build-start (pull_request_target) Successful in 11s
/ checks (pull_request) Successful in 1m10s
/ release-prepare (pull_request_target) Has been skipped
/ merge-conditions (pull_request) Successful in 7s
/ release-publish (pull_request_target) Has been skipped
0f708c4581

Note

The build job for 0f708c4581 finished with status success. Install and run the x86_64 test build with:

curl https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6306023/artifacts/raw/censor-dev.flatpak -o censor-dev.flatpak
flatpak install --user censor-dev.flatpak
flatpak run --user page.codeberg.censor.Censor.Devel
> **Note** > The [build job](https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6306023) for 0f708c458117f207058d55e7ac8a2e8cc34f9fa9 finished with status **success**. Install and run the x86_64 test build with: > > curl https://gitlab.gnome.org/mahlzahn/censor-ci/-/jobs/6306023/artifacts/raw/censor-dev.flatpak -o censor-dev.flatpak > flatpak install --user censor-dev.flatpak > flatpak run --user page.codeberg.censor.Censor.Devel
mahlzahn scheduled this pull request to auto merge when all checks succeed 2026年03月17日 19:56:12 +01:00
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
censor/Censor!151
Reference in a new issue
censor/Censor
No description provided.
Delete branch "mahlzahn/feat_redact_links_and_widgets"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?