pdflinks
pdflinks is a tool which (1) extracts links from PDFs and (2) checks they are
not stalled (timeouts, HTTP 4xx/5xx, only HTTP, etc).
It is not targeting a CI pipeline usage. Most of the messages are false positives and that is inherent with the task. Instead, it is meant to be run from time to time, with the output checked by a human.
Usage
⟩ uvx pdflinks full-audio-slides.pdf
full-audio-slides.pdf: 5s timeout: https://www.bluez.org/
full-audio-slides.pdf: skipped 'http' request: http://www.dest-unreach.org/socat/
full-audio-slides.pdf: 404 HTTP code: https://elixir.bootlin.com/linux/latest/source/sound/soc/samsung/neo1973_wm8753.c
full-audio-slides.pdf: 404 HTTP code: https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bindings/sound/atmel-wm8904.txt
⟩ # only do link extraction:
⟩ uvx pdflinks -l full-audio-slides.pdf | wc -l
131
⟩ # warn on redirect:
⟩ uvx pdflinks --warn-on-redirects full-audio-slides.pdf | wc -l
91
How it works
- Extract URLs from PDFs.
- Group them up by domain.
- Distribute domains to a few workers. A worker loops over URLs, making requests and reporting errors (but continuing).
Notes:
- We start work with domains that have the most URLs. It will probably take the longest.
- It is more efficient to call it once rather than N times. That way it groups URLs together, dedups them and doesn't wait on a trailing domain with many URLs.
- The domain grouping means we never send more than one concurrent request to
any domain. We don't sleep and don't respect
robots.txthowever. - We lie about our
User-Agentto avoid being caught by Anubis & co. - When an error occurs, we print it once per PDF in which it appeared. That means grepping the output for one specific PDF works as expected.
Metadata
Release files for pdflinks 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pdflinks-0.1.3.tar.gz | 16.4 kB | Without provenance | Details for pdflinks-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pdflinks-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for pdflinks-0.1.3-py3-none-any.whl |
Total release size: 33.1 kB
Release files / pdflinks-0.1.3.tar.gz
| Download URL | pdflinks-0.1.3.tar.gz |
|---|---|
| Size | 16.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efc61617b712feb9aa92f275cef5b0ec8f54bbef30991e7704d266ad0dcf89f3
|
|
BLAKE2b-256 checksum How to use checksums |
5cba39a5b1c163a3f8a5f109b27ec2635ac723115344a8241fc715f4c609fa9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pdflinks-0.1.3-py3-none-any.whl
| Download URL | pdflinks-0.1.3-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4d694a855071b157527116367bf87680e3c7a939b4b788e20516e93317c2f982
|
|
BLAKE2b-256 checksum How to use checksums |
5ad1f2d1e2994e0936dff3eeb82de4d687fb486389ebc2742ee6db8d1670f619
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pdflinks 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.