Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Hackernews::Parser 0.1

    Download button

    No screenshots available
    Downloads: 94  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Daniel Bolton | More programs
    FDL / FREE
    October 12th, 2011, 05:06 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Hackernews::Parser description

    A Perl interface to Hackernews stories and data

    Hackernews::Parser is a Perl interface to Hackernews (http://news.ycombinator.com/) stories and data.

    The only subroutine of Hackernews::Parser is hn_parse. It takes the following arguments:

     1. target - This is what page to download the data from; is either top or new. Defaults to top.
     2. number - This is the rank of the story. 1 is the top story, and so on. Defaults to 1.
     3. datum - This is the name of the datum and hash key to be return (list follows. The default is all, which returns the hash ref as a scalar.

    The subroutine stores data in an anonymous hash that may contain any of the following keys, depending on what the pattern was able to match:

    - age_qty - the numercal value of the age
    - age_unit - either hour(s) or minute(s)
    - age_sec - age in seconds calculated by the above
    - comments - number of comments
    - desc - description
    - domain - the domain on which the link is hosted
    - id - the unique numerical identification number of the link
    - score - the "karma" level of the link, or number of points
    - user - the name of the user who posted the link

    SYNOPSIS

     use Hackernews::Parser;
     
     my $top_hash_ref = hn_parse( 'top', '1' );
     # equivalent to:
     my $other_top_hash_ref = hn_parse();

     my $second_newest = hn_parse( 'new', '2' );



    Product's homepage

    Requirements:

    · Perl
    · LWP::Simple

      


    TAGS:

    Hackernews interface | Hackernews stories | Perl | Hackernews | interface

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM