textproc/p5-HTML-Truncate 0.20_1 FreeBSD
Truncate HTML by character count while preserving well-formedness
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- Categories
- textproc, www, perl5
- Package size
- 13.6 KiB, 25.3 KiB installed
Description
When working with text it is convenient and common to want to truncate strings to make them fit a desired context. E.g., you might have a menu that is only 100px wide and prefer text doesn't wrap so you'd truncate it around 15-30 characters, depending on preference and typeface size. This is trivial with plain text and substr but with HTML it is somewhat difficult because whitespace has fluid significance and open tags that are not properly closed destroy well-formedness and can wreck an entire layout.
HTML::Truncate attempts to account for those two problems by padding truncation for spacing and entities and closing any tags that remain open at the point of truncation.
In the other systems
| System | Port | Version |
|---|---|---|
| FreeBSD | textproc/p5-HTML-Truncate | 0.20_1 |
| DragonFly | textproc/p5-HTML-Truncate | 0.20_1 |
Install
Binary package:
pkg install p5-HTML-Truncate
From the ports tree:
cd /usr/ports/textproc/p5-HTML-Truncate/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-HTML-Truncate>0:textproc/p5-HTML-Truncate
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.20_1 | 0.20_1 | 0.20_1 | 0.20_1 | 0.20_1 |
| FreeBSD:14:quarterly | 0.20_1 | 0.20_1 | n/a | 0.20_1 | 0.20_1 |
| FreeBSD:15:latest | 0.20_1 | 0.20_1 | n/a | 0.20_1 | 0.20_1 |
| FreeBSD:15:quarterly | 0.20_1 | 0.20_1 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.20_1 | 0.20_1 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 2
p5-HTML-Parser>=2: www/p5-HTML-Parserp5-HTML-Tagset>=3: www/p5-HTML-Tagset
Runtime 2
p5-HTML-Parser>=2: www/p5-HTML-Parserp5-HTML-Tagset>=3: www/p5-HTML-Tagset
The full lists below include those, and their dependencies in turn.
Build dependencies 13
Run dependencies 13
No port depends on this one.
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 2
- %%PERL5_MAN3%%/HTML::Truncate.3.gz
- %%SITE_PERL%%/HTML/Truncate.pm
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| HTML-Truncate-0.20.tar.gz | 36450 | db5dd82b1a371a9df0e16bc8cdcaf28c44c9f5ab01ead0f9cdeed60291d3e8c5 |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.