I have 714 posts and I just saw a question asking about web application frameworks. I wanted to point him to my relevant posts, but I would be crazy to sift thru 714 posts (or Mother Teresa, take your pick).

Anyway, here is a sample session with my post cataloging program and actual source of the program:

[localhost:~/Documents/perl/monks] metaperl% perl log-posts.pl url? http://www.perlmonks.org/index.pl?node_id=124633&lastnode_id= +126016 title? Re: Big Ball of Mud category (EOF to end)? design patterns category (EOF to end)? software engineering category (EOF to end)? monolithic programs category (EOF to end)? Inserting: node 124633 Title Re: Big Ball of Mud Categories design patterns, software engineering, monolithic prog +rams [localhost:~/Documents/perl/monks] metaperl%

use strict; sub trim { $_[0] =~ s/^\s+//g; $_[0] =~ s/\s+$//g; } sub question { print "$_[0]? "; <>; } my $url = question 'url'; my ($node) = $url =~ /node_id=(\d+)/ ; my $title = question 'title'; trim $title; my @cat; while (my $cat = question 'category (EOF to end)') { trim $cat; chomp($cat); push @cat, $cat; } print "Inserting:\n"; print "node\t\t$node\n"; print "Title\t\t$title\n"; { local $"= ', '; print "Categories\t@cat\n"; }
So I want to create a database of all my posts, searchable and browseable by keyword. I know this has been discussed ad infinitum, but no one has come up with a useable mechanism for it.

The actual hook into this code can be via FTP, CGI or whatever else you guys suggest, but I need to get something off the ground for myself and I am sure you people do too.


In reply to posting catalog source with example by princepawn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.