Skip to main content

save_url

PyPI version Python versions License: GPL v3

A CLI utility to save any web page into a single, self-contained HTML file with an automatic and structured filename.


✨ Features

  • Self-contained HTML: Bundles CSS, JavaScript, images, and fonts into a single offline .html file.
  • Dedicated CLI Commands:
    • save_url / save_url_monolith: Ultra-fast, lightweight Rust-based capture using monolith without requiring a browser engine (default backend).
    • save_url_singlefile: High-fidelity capture supporting modern JavaScript/SPAs via single-file-cli with automatic anti-cookie banner suppression.
  • Automatic Title Extraction: Retrieves the page title from downloaded content (with fallback to mechanize or interactive prompt).
  • Structured Filenames: Names output files predictably by default with timestamp and page title:
    YYYYMMDD HHMM Page Title.html
    
  • Customizable Output: Option to omit the date/time prefix (--notime).
  • Colorful CLI Feedback: Displays operation status, error reporting, and humanized saved file sizes.

📋 Prerequisites

save_url relies on external backend executables available in your system $PATH:

1. Monolith (monolith) — Default Backend

Used by save_url (default) and save_url_monolith:

2. SingleFile CLI (single-file-cli) — Alternative Backend

Used by save_url_singlefile. Requires Node.js and a Chromium-based browser (Chromium, Google Chrome, Brave, etc.):

npm install -g single-file-cli

🚀 Installation

Using pip / pipx

pip install save_url

Or with pipx (recommended for CLI tools):

pipx install save_url

Gentoo Linux

An ebuild is available in the myportage repository:

emerge -av www-apps/save_url

📖 Usage

Using Monolith Backend (save_url or save_url_monolith)

save_url https://www.kde.org
# o explícitamente:
save_url_monolith https://www.kde.org

Output example:

20260921 0752 KDE Community Home - KDE.org.html

Using SingleFile Backend (save_url_singlefile)

save_url_singlefile https://www.kde.org

Omit Date & Time Prefix

To save the file using only the page title:

save_url https://www.kde.org --notime
# o con singlefile:
save_url_singlefile https://www.kde.org --notime

Output example:

KDE Community Home - KDE.org.html

Command-Line Options

usage: save_url [-h] [--version] [--notime] url

Script to save an url in a single file with an automatic and structured name.

positional arguments:
  url         Url to save

options:
  -h, --help  show this help message and exit
  --version   show program's version number and exit
  --notime    Removes date and time from the beginning of the file name

🛠️ Development & Testing

This project uses Poetry and poethepoet for development tasks.

# Clone the repository
git clone https://github.com/turulomio/save_url.git
cd save_url

# Install dependencies
poetry install

# Run unit tests with coverage
poetry run poe test

# Manage and compile translations (Release only)
poetry run poe translate

📄 License

This project is licensed under the GPL-3.0-only License. See the LICENSE.txt file for details.

Developed by Mariano Muñoz (@turulomio).

Metadata

Release files for save_url 1.2.0

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

Source distribution (sdist)

Source distribution for save_url 1.2.0
File Size Uploaded
save_url-1.2.0.tar.gz 26.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for save_url 1.2.0
File Interpreter ABI Platform
save_url-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 66.0 kB

Release files / save_url-1.2.0.tar.gz

Download URL save_url-1.2.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f1075c481678caf05b69dba5c76553e6c54381e031a5d8f76987d449439c9a02
BLAKE2b-256 checksum
How to use checksums
7b5392babd851d4518c8cda98c20686fac193e2e6858715748933ceff820929a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.7 Linux/7.2.6-gentoo

Release files / save_url-1.2.0-py3-none-any.whl

Download URL save_url-1.2.0-py3-none-any.whl
Size 39.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92613daa0e51c6d8471fcbdcc4481cc2ec71f166ff3bdb8822a770dd142da5d3
BLAKE2b-256 checksum
How to use checksums
0104f97694b4d185ebcab97b66ce904976a9c0e6a1b2fa1d7999a3e3e847c1cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.5.1 CPython/3.14.7 Linux/7.2.6-gentoo

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.0.0

2 release files

0.7.0

2 release files

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