I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part.
Same problem happens in "type" command in MS-DOS.
I know you can do it by opening it in Internet Explorer,... (4 Replies)
Hi All,
I need to check for a process, if the process is running then I have to create an HTML file, say A.HTML.
If the process is not running then I have to rename the existing html, say A.HTML to B.HTML so that the process which looks for the file A.HTML does not find it?
How do I do... (1 Reply)
Hi
I need to create multiple text files from onc text file on AIX. The data of text files is as below:
**********************************************
**********************************************
DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009
Copyright (c) 1982,... (11 Replies)
I need a script that can do this:
A script that searches all directories and subdirectories for .html files
When a .html file is found it creates a index.html file in that folder.
It then edits the index.html file and inserts links to all of the .html files that are in that folder into the... (5 Replies)
I was trying to parse the text file, which will looks like this
###XYZABC####
############
int = 4
char = 1
float = 1
.
.
############
like this my text file will contains lots of entries and I need to store these entries in the map eg. map.first = int and map.second = 4 same way I... (5 Replies)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi there, I'm quite new to the forum and shell scripting.
I want to filter out the "166.0 points". The results, that i found in google / the forum search didn't helped me :(
<a href="/user/test" class="headitem menu" style="color:rgb(83,186,224);">test</a><a href="/points" class="headitem... (1 Reply)
Hi Guys,
I have a list a hotels stored in many different text files.
This list is kept in the following format:
20/03
Hotel:
The Bear Hotel
Honey Street
Woodstock
UK
Tel:+44-xxxxxx
Rate: 100
21/03
Hotel:
The Bush Hotel
Nice Street
Farnham (4 Replies)
Hi all,
Is there any out there have a brilliant idea on how to export html table data as .csv or write to txt file with separated comma and also get the filename of link from every table and put one line per rows each table.
Please see the attached html and PNG of what it looks like.
... (7 Replies)
I have a txt file with a list of error messages in a xml tag format, and each error message is separated with a identifier(endresult).Need to split that and copy and create a new html file.Error message has some special character. how to escape the special character and insert my data into the... (7 Replies)
Discussion started by: DevAakash
7 Replies
LEARN ABOUT DEBIAN
plack::middleware::deflater
Plack::Middleware::Deflater(3pm) User Contributed Perl Documentation Plack::Middleware::Deflater(3pm)NAME
Plack::Middleware::Deflater - Compress response body with Gzip or Deflate
SYNOPSIS
use Plack::Builder;
builder {
enable sub {
my $app = shift;
sub {
my $env = shift;
my $ua = $env->{HTTP_USER_AGENT} || '';
# Netscape has some problem
$env->{"psgix.compress-only-text/html"} = 1 if $ua =~ m!^Mozilla/4!;
# Netscape 4.06-4.08 have some more problems
$env->{"psgix.no-compress"} = 1 if $ua =~ m!^Mozilla/4.0[678]!;
# MSIE (7|8) masquerades as Netscape, but it is fine
if ( $ua =~ m!MSIE (?:7|8)! ) {
$env->{"psgix.no-compress"} = 0;
$env->{"psgix.compress-only-text/html"} = 0;
}
$app->($env);
}
};
enable "Deflater",
content_type => ['text/css','text/html','text/javascript','application/javascript'],
vary_user_agent => 1;
sub { [200,['Content-Type','text/html'],["OK"]] }
};
DESCRIPTION
Plack::Middleware::Deflater is a middleware to encode your response body in gzip or deflate, based on "Accept-Encoding" HTTP request
header. It would save the bandwidth a little bit but should increase the Plack server load, so ideally you should handle this on the
frontend reverse proxy servers.
This middleware removes "Content-Length" and streams encoded content, which means the server should support HTTP/1.1 chunked response or
downgrade to HTTP/1.0 and closes the connection.
CONFIGURATIONS
content_type
content_type => 'text/html',
content_type => [ 'text/html', 'text/css', 'text/javascript', 'application/javascript', 'application/x-javascript' ]
Content-Type header to apply deflater. if content-type is not defined, Deflater will try to deflate all contents.
vary_user_agent
vary_user_agent => 1
Add "User-Agent" to Vary header.
ENVIRONMENT VALUE
psgix.no-compress
Do not apply deflater
psgix.compress-only-text/html
Apply deflater only if content_type is "text/html"
LICENSE
This software is licensed under the same terms as Perl itself.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
Plack, <http://httpd.apache.org/docs/2.2/en/mod/mod_deflate.html>
perl v5.14.2 2012-06-18 Plack::Middleware::Deflater(3pm)