Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Wiki::Toolkit::Formatter::Mediawiki 0.02

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Derek R. Price | More programs
    Perl Artistic License / FREE
    April 2nd, 2007, 20:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Wiki::Toolkit::Formatter::Mediawiki description

    Wiki::Toolkit::Formatter::Mediawiki is a Mediawiki-style formatter for Wiki::Toolkit.

    Wiki::Toolkit::Formatter::Mediawiki is a Mediawiki-style formatter for Wiki::Toolkit.

    SYNOPSIS

    This package implements a formatter for the Wiki::Toolkit module which attempts to duplicate the behavior of the Mediawiki application (a set of PHP scripts used by Wikipedia and friends).

    use Wiki::Toolkit
    use Wiki::Toolkit::Store::Mediawiki;
    use Wiki::Toolkit::Formatter::Mediawiki;

    my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
    # See below for parameter details.
    my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new (%config,
    store => $store);
    my $wiki = Wiki::Toolkit->new (store => $store,
    formatter => $formatter);

    METHODS

    new
    my $store = Wiki::Toolkit::Store::Mediawiki->new ( ... );
    my $formatter = Wiki::Toolkit::Formatter::Mediawiki->new
    (allowed_tags => [# HTML
    qw(b big blockquote br caption center cite code dd
    div dl dt em font h1 h2 h3 h4 h5 h6 hr i li ol p
    pre rb rp rt ruby s small strike strong sub sup
    table td th tr tt u ul var),
    # MediaWiki Specific
    qw(nowiki),],
    allowed_attrs => [qw(title align lang dir width height bgcolor),
    qw(clear), # BR
    qw(noshade), # HR
    qw(cite), # BLOCKQUOTE, Q
    qw(size face color), # FONT
    # For various lists, mostly deprecated but
    # safe
    qw(type start value compact),
    # Tables
    qw(summary width border frame rules
    cellspacing cellpadding valign char
    charoff colgroup col span abbr axis
    headers scope rowspan colspan),
    qw(id class name style), # For CSS
    ],
    node_prefix => '',
    store => $store);

    Parameters will default to the values above, with the exception of store, which is a required argument without a default. store does not have to be of type Wiki::Toolkit::Store::Mediawiki.
    format

    my $html = $formatter->format ($content);

    Escapes any tags which weren't specified as allowed on creation, then interpolates any macros, then calls Text::WikiFormat::format (with the specialized Mediawiki config) to translate the raw Wiki language supplied into HTML.

    find_internal_links

    my @links_to = $formatter->find_internal_links ($content);

    Returns a list of all nodes that the supplied content links to.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Mediawiki-style formatter | Wiki::Toolkit formatter | Perl module | Wiki::Toolkit::Forma | Wiki::Toolkit | Mediawiki-style

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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