Skip to main content

this package provides the pdfdbl command:

pdfdbl scan dir1 dir2

This will walk down the directories provided as argument and for the PDF files found, create a hash based on (in order):

- metadata if unique
- images, if the number of images matches the number of pages
- text

This assumes that pdfinfo, pdfimages and pdftotext` from the poppler-utils package are avaialable.

A “database” is build up in ~/.config/pdfdbl/pdf.lst against which further scans are tested.

Removing markings

In ruamel/pdfdouble/pdfdouble.py there are two methods that can be enhanced to filter out markings in the PDF that make them less unique and make virtually the same files to have different hashes.

For text the method PdfData.filter_for_marking should be extended to remove and markings from the string that is its arguments and return the result.

For scanned images the method PdfData.process_image_and_update needs to be enhanced, e.g. by cutting off the images bottom and top X lines, and by removing any gray background text by setting all black pixels to white. This function needs to update the hash passed in using the .update() method passing in the filtered data.

Restrictions

The current “database” cannot handle paths that contain newlines

This utility is currently Python 2.7 only.

Release files for ruamel.pdfdouble 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ruamel.pdfdouble 0.1.2
File Size Uploaded
ruamel.pdfdouble-0.1.2.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ruamel.pdfdouble 0.1.2
File Interpreter ABI Platform
ruamel.pdfdouble-0.1.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 21.0 kB

Release files / ruamel.pdfdouble-0.1.2.tar.gz

Download URL ruamel.pdfdouble-0.1.2.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8986e56d81e751ed204ced7c34f10ab0b8a2a5e3aabe56d287acfbbb86847f3f
BLAKE2b-256 checksum
How to use checksums
b7d2faaf85f5fbefd36edfc2066a14a8b15b8f675653a0cdb6f2560884a36b17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ruamel.pdfdouble-0.1.2-py2.py3-none-any.whl

Download URL ruamel.pdfdouble-0.1.2-py2.py3-none-any.whl
Size 9.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
01f4aab4e90d7222115e02211aa575db6b8155c68920999639cf01dbb45d3bd1
BLAKE2b-256 checksum
How to use checksums
b3a0f96dea16434710cffb34441271ebe9345cbe680caf1912b112f963ecd015
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page