Thanks , franklin you method worked, i knew i had to use a while loop and getline in there just didnt know the proper order :)
Hi everyone, im trying to make the following command line shorter by introducing a script that join up all the grep commands
./new1a < numbers.txt | grep -i -v '^a '... (5 Replies)
I'm looking to have function that takes the present month and rewrites it into this form: _06_ (june), _09_ (september), and so on..
I would like this to be a my $this_month=code that rewrites date function
because I would like to be a able to call it multiple times in the script by writing... (5 Replies)
Hello All,
I have been asked to create a .htaccess redirect. I have never attempted to work with one of these files. We have a pretty vanilla LAMP setup using rhel4 apache1.3 and php4.2.3.
I was instructed to place the .htaccess file in the document root of the site and and to attempt to... (1 Reply)
Hi All,
I want to redirect from http://localhost/abc/xyz/def?cc=dk&lc=da
to http://localhost/abc/mnc/pdf?cc=dk&lc=da.
Please suggest a rewrite rule. (0 Replies)
hi there, I need that when user input
mysite.com/ponuka/AAA2869
it shows
mysite.com/ukaz.php?ponuka=AAA2869
because of facebook likes, and I found out that this is set up as rewrite rule in .htaccess file? how to achieve it?
thank you... :confused:
---------- Post updated at 04:47... (0 Replies)
Hi,
I have a domain "test.example.com" and i wanted to redirect only request like "test.example.com /index.html" to "test.example.com/index.html?NEW=1". Please note that a extra string "?NEW=1" added at the end of the URL.
So Request for http://test.example.com/index.html REDIRECTS TO... (12 Replies)
Hi all,
I am trying to find a rewrite rule that can help me with the following situation.
So I am currently on a page which has a URL:
http://www.test.mobile.com/#!/shop/phones/max-plus/features/
Now when I hover over a certain link, I can see that it will goto:
<a... (0 Replies)
Discussion started by: Junaid Subhani
0 Replies
LEARN ABOUT DEBIAN
html::rewriteattributes::resources
HTML::RewriteAttributes::Resources(3pm) User Contributed Perl Documentation HTML::RewriteAttributes::Resources(3pm)NAME
HTML::RewriteAttributes::Resources - concise resource-link rewriting
SYNOPSIS
# writing some HTML email I see..
$html = HTML::RewriteAttributes::Resources->rewrite($html, sub {
my $uri = shift;
my $content = render_template($uri);
my $cid = generate_cid_from($content);
$mime->attach($cid => content);
return "cid:$cid";
});
# need to inline CSS too?
$html = HTML::RewriteAttributes::Resources->rewrite($html, sub {
# see above
},
inline_css => sub {
my $uri = shift;
return render_template($uri);
});
# need to inline CSS and follow @imports?
$html = HTML::RewriteAttributes::Resources->rewrite($html, sub {
# see above
},
inline_css => sub {
# see above
}, inline_imports => 1);
DESCRIPTION
"HTML::RewriteAttributes::Resources" is a special case of HTML::RewriteAttributes for rewriting links to resources. This is to facilitate
generating, for example, HTML email in an extensible way.
We don't care about how to fetch resources and attach them to the MIME object; that's your job. But you don't have to care about how to
rewrite the HTML.
METHODS
"new"
You don't need to call "new" explicitly - it's done in "rewrite". It takes no arguments.
"rewrite" HTML, callback[, args] -> HTML
See the documentation of HTML::RewriteAttributes.
The callback receives as arguments the resource URI (the attribute value), then, in a hash, "tag" and "attr".
Inlining CSS
"rewrite" can automatically inline CSS for you.
Passing "inline_css" will invoke that callback to inline "style" tags. The callback receives as its argument the URI to a CSS file, and
expects as a return value the contents of that file, so that it may be inlined. Returning "undef" prevents any sort of inlining.
Passing "inline_imports" (a boolean) will look at any inline CSS and call the "inline_css" callback to inline that import.
This keeps track of what CSS has already been inlined, and won't inline a particular CSS file more than once (to prevent import loops).
SEE ALSO
HTML::RewriteAttributes, HTML::Parser, Email::MIME::CreateHTML
AUTHOR
Shawn M Moore, "<sartak@bestpractical.com>"
LICENSE
Copyright 2008-2010 Best Practical Solutions, LLC. HTML::RewriteAttributes::Resources is distributed under the same terms as Perl itself.
perl v5.10.1 2010-11-18 HTML::RewriteAttributes::Resources(3pm)