mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Add textproc/p5-HTML-Truncate 0.03, a Perl module that truncates HTML by
character count while preserving well-formedness.
This commit is contained in:
parent
909c27e18f
commit
83e2e3f0ff
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=151916
5 changed files with 55 additions and 0 deletions
|
@ -300,6 +300,7 @@
|
|||
SUBDIR += p5-HTML-Fraction
|
||||
SUBDIR += p5-HTML-TagFilter
|
||||
SUBDIR += p5-HTML-Tidy
|
||||
SUBDIR += p5-HTML-Truncate
|
||||
SUBDIR += p5-Hash-Merge
|
||||
SUBDIR += p5-IDNA-Punycode
|
||||
SUBDIR += p5-IO-CSVHeaderFile
|
||||
|
|
32
textproc/p5-HTML-Truncate/Makefile
Normal file
32
textproc/p5-HTML-Truncate/Makefile
Normal file
|
@ -0,0 +1,32 @@
|
|||
# New ports collection makefile for: textproc/p5-HTML-Truncate
|
||||
# Date created: 23 December 2005
|
||||
# Whom: Anton Berezin <tobez@FreeBSD.org>
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= HTML-Truncate
|
||||
PORTVERSION= 0.03
|
||||
CATEGORIES= textproc www perl5
|
||||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
|
||||
MASTER_SITE_SUBDIR= HTML
|
||||
PKGNAMEPREFIX= p5-
|
||||
|
||||
MAINTAINER= perl@FreeBSD.org
|
||||
COMMENT= truncate HTML by character count while preserving well-formedness
|
||||
|
||||
BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/HTML/TokeParser.pm:${PORTSDIR}/www/p5-HTML-Parser \
|
||||
${SITE_PERL}/${PERL_ARCH}/HTML/Entities.pm:${PORTSDIR}/www/p5-HTML-Parser
|
||||
RUN_DEPENDS= ${BUILD_DEPENDS}
|
||||
|
||||
PERL_CONFIGURE= yes
|
||||
|
||||
MAN3= HTML::Truncate.3
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${PERL_LEVEL} < 500800
|
||||
IGNORE= requires perl 5.8.0 or later. Install lang/perl5.8 and try again
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
3
textproc/p5-HTML-Truncate/distinfo
Normal file
3
textproc/p5-HTML-Truncate/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
|||
MD5 (HTML-Truncate-0.03.tar.gz) = 1c3232619a1487de745f1b513538c0e1
|
||||
SHA256 (HTML-Truncate-0.03.tar.gz) = b0032e7cb02dc5aa1670d456e0e65bd1dffce3eafcb5986b1dcc6e726a319274
|
||||
SIZE (HTML-Truncate-0.03.tar.gz) = 8407
|
14
textproc/p5-HTML-Truncate/pkg-descr
Normal file
14
textproc/p5-HTML-Truncate/pkg-descr
Normal file
|
@ -0,0 +1,14 @@
|
|||
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.
|
||||
|
||||
WWW: http://search.cpan.org/dist/HTML-Truncate/
|
5
textproc/p5-HTML-Truncate/pkg-plist
Normal file
5
textproc/p5-HTML-Truncate/pkg-plist
Normal file
|
@ -0,0 +1,5 @@
|
|||
%%SITE_PERL%%/HTML/Truncate.pm
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML/Truncate/.packlist
|
||||
@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML/Truncate 2>/dev/null || true
|
||||
@unexec rmdir %D/%%SITE_PERL%%/%%PERL_ARCH%%/auto/HTML 2>/dev/null || true
|
||||
@unexec rmdir %D/%%SITE_PERL%%/HTML 2>/dev/null || true
|
Loading…
Add table
Reference in a new issue