extract_url.pl 1.4 (Default branch)


 
Thread Tools Search this Thread
Special Forums News, Links, Events and Announcements Software Releases - RSS News extract_url.pl 1.4 (Default branch)
# 1  
Old 10-14-2008
extract_url.pl 1.4 (Default branch)

extract_url.pl is a Perl script that extracts URLs from either correctly-encoded MIME email messages or from plain text. It can be used either as a pre-parser for a URL selector (such as urlview), or as a standalone URL selector. It is very configurable, can handle URLs that have been broken over several lines in format=flowed delsp=yes email messages, and eliminates duplicate URLs. It was designed primarily for use with Mutt, but can be used by for any similar purpose. The idea is that if you want to access a URL in an email, you pipe the email to a URL extractor (like this one), which then lets you select a URL to view in some third program (such as Firefox). License: BSD License (original) Changes:
This release adds support for a configurable alternative selection key (via ALTSELECT), allowing a person to, in effect, temporarily negate the PERSISTENT setting. It adds conditional support for long options if Getopt::Long is available. Image

Image

More...
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
URI::Encode(3pm)					User Contributed Perl Documentation					  URI::Encode(3pm)

NAME
URI::Encode - Simple percent Encoding/Decoding SYNOPSIS
# OOP Interface use URI::Encode; my $uri = URI::Encode->new({encode_reserved =>0}); my $encoded = $uri->encode($data); my $decoded = $uri->decode($encoded); # Functional use URI::Encode qw(uri_encode uri_decode); my $encoded = uri_encode($data); my $decoded = uri_decode($encoded); DESCRIPTION
This modules provides simple URI (Percent) encoding/decoding The main purpose of this module (at least for me) was to provide an easy method to encode strings (mainly URLs) into a format which can be pasted into a plain text emails, and that those links are 'click-able' by the person reading that email. This can be accomplished by NOT encoding the reserved characters. This module can also be useful when using HTTP::Tiny to ensure the URLs are properly escaped. If you are looking for speed and want to encode reserved characters, use URI::Escape::XS See this script <https://github.com/mithun/perl-uri-encode/raw/master/.author/benchmark.pl> for a comparison on encoding results and performance. METHODS
new() Creates a new object, no arguments are required my $encoder = URI::Encode->new(\%options); The following options can be passed to the constructor encode_reserved my $encoder = URI::Encode->new({encode_reserved => 0}); If true, "Reserved Characters" are also encoded. Defaults to false. encode($url, $including_reserved) This method encodes the URL provided. The method does not encode any "Reserved Characters" unless $including_reserved is true or set in the constructor. The $url provided is first converted into UTF-8 before percent encoding. $uri->encode("http://perl.com/foo bar"); # http://perl.com/foo%20bar $uri->encode("http://perl.com/foo bar", 1); # http%3A%2F%2Fperl.com%2Ffoo%20bar decode($url) This method decodes a 'percent' encoded URL. If you had encoded the URL using this module (or any other method), chances are that the URL was converted to UTF-8 before 'percent' encoding. Be sure to check the format and convert back if required. $uri->decode("http%3A%2F%2Fperl.com%2Ffoo%20bar"); # "http://perl.com/foo bar" EXPORTED FUNCTIONS
The following functions are exported upon request. This provides a non-OOP interface uri_encode($url, $including_reserved) See "encode($url, $including_reserved)" uri_decode($url) See "decode($url)" CHARACTER CLASSES
Reserved Characters The following characters are considered as reserved (RFC 3986 <http://tools.ietf.org/html/rfc3986>). They will be encoded only if requested. ! * ' ( ) ; : @ & = + $ , / ? % # [ ] Unreserved Characters The following characters are considered as Unreserved. They will not be encoded a-z A-Z 0-9 - _ . ~ DEPENDENCIES
Encode ACKNOWLEDGEMENTS
Gisle Aas for URI::Escape David Nicol for Tie::UrlEncoder SEE ALSO
RFC 3986 <http://tools.ietf.org/html/rfc3986> URI::Escape URI::Escape::XS URI::Escape::JavaScript Tie::UrlEncoder BUGS AND LIMITATIONS
Please report any bugs or feature requests to "bug-uri-encode@rt.cpan.org", or through the web interface at http://rt.cpan.org/Public/Dist/Display.html?Name=URI-Encode <http://rt.cpan.org/Public/Dist/Display.html?Name=URI-Encode> AUTHOR
Mithun Ayachit "mithun@cpan.org" LICENSE AND COPYRIGHT
Copyright (c) 2012, Mithun Ayachit. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. perl v5.14.2 2012-03-24 URI::Encode(3pm)