Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

web::scraper::filter(3pm) [debian man page]

Web::Scraper::Filter(3pm)				User Contributed Perl Documentation				 Web::Scraper::Filter(3pm)

NAME
Web::Scraper::Filter - Base class for Web::Scraper filters SYNOPSIS
package Web::Scraper::Filter::YAML; use base qw( Web::Scraper::Filter ); use YAML (); sub filter { my($self, $value) = @_; YAML::Load($value); } 1; use Web::Scraper; my $scraper = scraper { process ".yaml-code", data => [ 'TEXT', 'YAML' ]; }; DESCRIPTION
Web::Scraper::Filter is a base class for text filters in Web::Scraper. You can create your own text filter by subclassing this module. There are two ways to create and use your custom filter. If you name your filter Web::Scraper::Filter::Something, you just call: process $exp, $key => [ 'TEXT', 'Something' ]; If you declare your filter under your own namespace, like 'MyApp::Filter::Foo', process $exp, $key => [ 'TEXT', '+MyApp::Filter::Foo' ]; You can also inline your filter function without creating a filter class: process $exp, $key => [ 'TEXT', sub { s/foo/bar/ } ]; Note that this function munges $_ and returns the count of replacement. Filter code special cases if the return value of the callback is number and $_ value is updated. You can, of course, stack filters like: process $exp, $key => [ '@href', 'Foo', '+MyApp::Filter::Bar', &baz ]; AUTHOR
Tatsuhiko Miyagawa perl v5.14.2 2009-03-24 Web::Scraper::Filter(3pm)

Check Out this Related Man Page

Jifty::DBI::Filter::YAML(3pm)				User Contributed Perl Documentation			     Jifty::DBI::Filter::YAML(3pm)

NAME
Jifty::DBI::Filter::YAML - This filter stores arbitrary Perl via YAML SYNOPSIS
use Jifty::DBI::Record schema { column my_data => type is 'text', filters are qw/ Jifty::DBI::Filter::YAML /; }; my $thing = __PACKAGE__->new; $thing->create( my_data => { foo => 'bar', baz => [ 1, 2, 3 ] } ); my $my_data = $thing->my_data; while (my ($key, $value) = %$my_data) { # do something... } DESCRIPTION
This filter provides the ability to store arbitrary data structures into a database column using YAML. This is very similar to the Jifty::DBI::Filter::Storable filter except that the YAML format remains human-readable in the database. You can store virtually any Perl data, scalar, hash, array, or object into the database using this filter. In addition, YAML (at least the storage of scalars, hashes, and arrays) is compatible with data structures written in other languages, so you may store or read data between applications written in different languages. METHODS
encode This method is used to encode the Perl data structure into YAML formatted text. decode This method is used to decode the YAML formatted text from the database into the Perl data structure. IMPLEMENTATION
This class will attempt to use YAML::Syck if it is available and then fall back upon YAML. This has been done because the Syck library is written in C and is considerably faster. SEE ALSO
Jifty::DBI::Filter, YAML, YAML::Syck AUTHOR
Andrew Sterling Hanenkamp <hanenkamp@cpan.org> LICENSE
This program is free software and may be modified or distributed under the same terms as Perl itself. perl v5.14.2 2010-09-21 Jifty::DBI::Filter::YAML(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Web Server - uploading Frontpage web - will there be problems??

hiya All, New to this Web site stuff. Will be installing Fedora's latest O/S (including Apache) - onto a spare PC Then... Gulp... setting up a Web server. Designing a Web site using WINDOWS FRONT PAGE 2002: * Simply easiest/quickiest way to knock up a basic site. * There won't be... (6 Replies)
Discussion started by: marty 600
6 Replies

2. UNIX for Dummies Questions & Answers

Need dummies guide to setting up Web server...

Hiya All, Hope you can help! I need a Dummies guide to setting up a Web server. I hope you have some good URLs or advice etc. I now finally have: 1. "Web Server" - Fedora Core3 onto my Spare PC. 2. Windows XP laptop 3. Basic Web site set up via Front Page - to upload onto Web... (5 Replies)
Discussion started by: marty 600
5 Replies

3. Web Development

Web Development, Web 2.0 and Mashups

I think we are missing an important forum on Web Development, including Web 2.0 and Mashups. Well, here is another poll ..... I vote yes :b: (4 Replies)
Discussion started by: Neo
4 Replies

4. Shell Programming and Scripting

Filter data and send email

Need script....We get sar file sa15 with 7 days data which gets appended.. we want filter and parse the outptu such that we should filter only last 48 hours data and then email it to out team. we read -- sar -f sa15 Please help me with the script either by use sar itself or even sar and awk... (10 Replies)
Discussion started by: noorm
10 Replies

5. Web Development

Web Accessibility: text resize

An in house development team is building a website and we were wondering what from a Web Accessibility standpoint is a best practice when it comes to resizing text. Most browsers have a menu item to resize text, but not all users may know it is there or may have difficulty reaching it. Some... (6 Replies)
Discussion started by: figaro
6 Replies

6. Shell Programming and Scripting

Filter a .kml file (xml) with data set from text file

I have a .kml file. So I want filter the .kml to get only the tags that have this numeric codes that they are in a text file 11951 11952 74014 11964 11965 11969 11970 11971 11972 60149 74018 74023 86378 11976 11980 11983 11984 11987 (5 Replies)
Discussion started by: pcoj33
5 Replies

7. Programming

PHP Filter and CUT

Hi All, i have a log file .i want to cut and filter using some conditions in PHP condition 1:first i want to filter the datas having "P12345" condition 2:cut the session ID and time stamp(i.e 77087432)for all user id "P12345" P123456_77087432:INFO: login P123456_77087432:INFO:UpdateInfo o... (5 Replies)
Discussion started by: navsan420
5 Replies

8. UNIX for Dummies Questions & Answers

Filter logs for key words and create an index

well, im a total novice of unix commands and shell scripting, i never made anything. But yesterday in my work i was working with a lot of log files and i was wondering if there is a command for doing something like this: i have a bunch of files with text like this: blablabla errorcode1... (11 Replies)
Discussion started by: matius_88
11 Replies

9. Shell Programming and Scripting

Newbie Python Url Scraper

I setup Zoneminder and have been playing around with setting up a couple of Wanscam PTZ ip cameras in which I have been running into road blocks with streaming and etc. I cant find much information on the camera and its webserver that sits on it and wanted to get a an absolute directory structure... (5 Replies)
Discussion started by: metallica1973
5 Replies

10. Shell Programming and Scripting

Web page with picture, text, php function

Hello. I'm trying to create a web page which the presentation is as follows: 1 °) at the top of page an image 2 °) below the text 3 °) to complete a php function that returns information. I tried different things but none work. Script 1: <!DOCTYPE html> <html> <head> <style> div { ... (5 Replies)
Discussion started by: jcdole
5 Replies

11. Shell Programming and Scripting

Filter all the lines with minimum specified length of words of a text file

Hi Can someone tell me which script will work best (in terms of speed and simplicity to write and run) for a large text file to filter all the lines with a minimum specified length of words ? A sample script with be definitely of great help !!! Thanks in advance. :) (4 Replies)
Discussion started by: my_Perl
4 Replies

12. Shell Programming and Scripting

Filter file with condition

Gents, I am stuck at end of my process.. I got the following file (input). And I want to filter it, checking from the column 2 to the end of the file. The condition is if in any column from cl2 to the end exist value 3, not filter, but if there is not value 3, should print all the row(output... (6 Replies)
Discussion started by: jiam912
6 Replies

13. UNIX for Advanced & Expert Users

Filter table of different length

Dear Forum, I have to filter (e.g. PF=0.8) a text file according to some measured and recorded values for different fields (sensor). The files can be large and the recorded data points (ID) could differ in length. I have worked out a solution but it is very messy and not flexible. Does anybody... (4 Replies)
Discussion started by: GDC
4 Replies

14. What is on Your Mind?

Thoughts on Dystopian Future as we know it!

Greetings Fellow NIX'ers, For a while now I've been pondering the (to Me) Dystopian possibilities of "Cloud Computing", Web Apps (Pay Per Each Use) of course, and... the Most Troubling of All: The possible time when we will not be allowed to own a "Real" computer, only some silly little... (7 Replies)
Discussion started by: Coding Coolie
7 Replies

15. What is on Your Mind?

Ravinder Singh Just Earned His Green Web Dev Ops Badge

Congrats to Ravinder Singh for his new Green Web Dev Ops badge. Everyone starts to learn and grown in technology and Ravinder is starting to learn Web Dev and is making progress quickly. https://www.unix.com/members/1-albums215-picture1010.png (6 Replies)
Discussion started by: Neo
6 Replies