Skip to main content

doc License: GPL v3

Status

pytests push-pypi push-doc

maintained issues pr

Compatibilities

ubuntu unix

python

Contact

linkedin website mail

HtmlMerger

A package allowing to merge all html files in a directory in a single file.

Installation

git clone https://github.com/pcotteadvestis/htmlmerger
cd htmlmerger
python setup.py install

or

pip install htmlmerger

Usage

Merges html files into a fingle file

For each file, will extract the content between the ... <\head><\body><\html> or

... <\\body><\\html> and put all those contents between those same tags in a new file. Simple as that.

You can either give a list of files or a directory as input, and if not specified the output will be input_directory/merged.html, or ./merged.html. You can also pass the argument "clean=True" when calling merge() to delete the individual files used for merging.

Supports transparentpath objects.

from htmlmerger import HtmlMerger
merger = HtmlMerger(input_directory="my_htmls/")  # result will be in my_htmls/merged.html
merger.merge(clean=True)  # or clean=False to keep the individual files (default behavior)

from pathlib import Path
merger = HtmlMerger(files=Path("my_htmls/").glob("*"))  # result will be in ./merged.html
merger.merge()

Metadata

Release files for htmlmerger 0.1.46

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

Source distribution (sdist)

Source distribution for htmlmerger 0.1.46
File Size Uploaded Provenance Actions
htmlmerger-0.1.46.tar.gz 36.6 kB Without provenance Details for htmlmerger-0.1.46.tar.gz

Release files / htmlmerger-0.1.46.tar.gz

Download URL htmlmerger-0.1.46.tar.gz
Size 36.6 kB
Tags Source
SHA-256 checksum
How to use checksums
32c74d4355893f2ee356204e9011a743abcecbffdc995d81f6eddacb0b3c464b
BLAKE2b-256 checksum
How to use checksums
7f9312014f0564e872eb864f91b454d32c2d0c6b74439f70409a74dd2617222f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for htmlmerger 0.1.46

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.

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