GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mazamaka/pdf_linkchecker_docker: Docker-based PDF link validator with Prometheus monitoring

BranchesTags
Open more actions menu

Latest commit

 

History

4 Commits
4 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
main.py
main.py
 
 
make_html.py
make_html.py
 
 
parse_output.py
parse_output.py
 
 
pdf_links_check.txt
pdf_links_check.txt
 
 
run_checker.sh
run_checker.sh
 
 

Repository files navigation

PDF Link Checker Docker

Python Docker License Platform

Containerized pipeline for validating HTTP/HTTPS links extracted from PDF documents. Uses linkchecker under the hood with structured CSV reporting.

Features

  • Validates HTTP/HTTPS links from a plain-text URL list
  • Generates structured CSV reports with status codes, redirect counts, and PDF detection
  • Tracks redirect chains and identifies broken links
  • Recognizes SSL/TLS errors and rate-limit responses
  • Fully containerized -- single docker run command
  • Zero Python dependencies beyond the standard library

Architecture

pdf_links_check.txt  (input: one URL per line)
        |
  make_html.py       -> converts URLs to an HTML document
        |
  linkchecker        -> validates every link, writes output.log
        |
  parse_output.py    -> parses the log, generates results.csv
        |
  results.csv        (output)
Component Purpose
make_html.py Converts URL list into an HTML file with clickable links
linkchecker CLI tool that crawls the HTML and validates all links
parse_output.py Parses linkchecker output into structured CSV
run_checker.sh Orchestrates the full pipeline

Quick Start

# Clone
git clone https://github.com/mazamaka/pdf_linkchecker_docker.git
cd pdf_linkchecker_docker

# Build
docker build -t pdf-linkchecker .

# Prepare input -- one URL per line
echo "https://example.com/doc.pdf" > my_links.txt

# Run
docker run --rm \
  -v $(pwd)/my_links.txt:/app/pdf_links_check.txt \
  -v $(pwd)/output:/app \
  pdf-linkchecker

Results are saved to results.csv in the mounted directory.

Input / Output

Input (pdf_links_check.txt)

Plain text file, one URL per line:

https://example.com/document.pdf
https://another.site.com/report.pdf

Output (results.csv)

Column Description Example
url Validated URL https://example.com/doc.pdf
status HTTP status code or error text 200, 404, SSL error
is_valid Link is reachable True / False
is_pdf URL points to a PDF file True / False
redirects_count Number of redirects 0, 2

Configuration

Valid Status Codes

The parser treats these codes as valid: 200-204, 206, 301-303, 307-308, 401, 403, 416, 429.

Linkchecker Options

Edit run_checker.sh to customize:

linkchecker temp_links.html \
  --check-extern \
  --no-status \
  --verbose \
  --timeout=10

See linkchecker docs for all flags.

Project Structure

.
├── Dockerfile           # Image definition (python:3.13-slim + linkchecker)
├── run_checker.sh       # Pipeline orchestrator
├── make_html.py         # URL list -> HTML converter
├── parse_output.py      # Log parser -> CSV generator
├── pdf_links_check.txt  # Sample input
└── README.md

Troubleshooting

Problem Solution
No links in output Check pdf_links_check.txt encoding (UTF-8) and format
SSL/TLS errors Logged as invalid; some servers have bad certificates
Timeouts Increase --timeout in run_checker.sh
Permission errors Use docker run --user $(id -u):$(id -g) ...

License

MIT

Author

Maksym Babenko -- GitHub | Telegram

About

Docker-based PDF link validator with Prometheus monitoring

Resources

Readme
Activity

Stars

3 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.