A CLI tool to check URLs and save webpages as PDFs
Project description
Webpage2PDF
A CLI tool to check URLs and save webpages as PDFs.
Installation
pip install -e .
Installation from PyPI
pip install webpage-to-pdf-converter
Usage
webpage-to-pdf https://example.com --save-pdf
Docker
Build the Docker image:
docker build -t url-checker .
Running with Docker
- Create a local output directory:
mkdir -p output
- Run the container with volume mount:
docker run --rm -v $(pwd)/output:/app/output url-checker https://example.com --save-pdf --output /app/output/webpage.pdf
The PDF file will be saved in your local output directory. The tool will show both the container path and the absolute path of the generated file:
✓ PDF saved successfully as '/app/output/webpage.pdf'
File location: /app/output/webpage.pdf
Using the Program with Docker
After building the image, you can run the container to check a URL directly. For example, to check "https://example.com" and save the webpage as a PDF, run:
docker run --rm url-checker https://example.com --save-pdf
Release History
- 1.0.0 (2024-03-XX)
- Initial release
- URL reachability checking
- PDF generation from webpages
- Docker support
- Chrome/Chromium support
CI/CD
This project utilizes GitHub Actions for continuous integration. Refer to ci.yml for workflow details.
Development
Install development dependencies:
pip install -e ".[test]"
Run tests:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file webpage_to_pdf_converter-1.0.0.tar.gz.
File metadata
- Download URL: webpage_to_pdf_converter-1.0.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8035f8c3379d4a1fc61c98df8f976a1bbe2d944186080933d649f83660b3533e
|
|
| MD5 |
8aa869da6391b55fb4bc1f9f3e343b0f
|
|
| BLAKE2b-256 |
01ef50609e12ec04e235510d938db9f5caa55f60d61d9c323122190af3ae9c46
|
File details
Details for the file webpage_to_pdf_converter-1.0.0-py3-none-any.whl.
File metadata
- Download URL: webpage_to_pdf_converter-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2257fc5666461fbf1c53198026282c9b29298bba60c483fe74d14a176ecc2e6
|
|
| MD5 |
75db62389bfde1c7ff72da15c82e2033
|
|
| BLAKE2b-256 |
026ef63e6a95d04d7b06d758f2fe44a9dffee4964dc02d214676d66721dea77f
|