Softpedia
 


LINUX CATEGORIES:



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

    Text::WikiFormat 0.79

    Download button

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

    License / Price:

    Last Updated:

    Category:
    chromatic | More programs
    Perl Artistic License / FREE
    August 22nd, 2007, 18:05 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Text::WikiFormat description

    Text::WikiFormat is a Perl module for translating Wiki formatted text into other formats.

    Text::WikiFormat is a Perl module for translating Wiki formatted text into other formats.

    SYNOPSIS

    use Text::WikiFormat;
    my $html = Text::WikiFormat::format($raw);

    The original Wiki web site had a very simple interface to edit and to add pages. Its formatting rules are simple and easy to use. They are also easy to translate into other, more complicated markup languages with this module. It creates HTML by default, but can produce valid POD, DocBook, XML, or any other format imaginable.

    The most important function is format(). It is not exported by default.

    format()

    format() takes one required argument, the text to convert, and returns the converted text. It allows two optional arguments. The first is a reference to a hash of tags. Anything passed in here will override the default tag behavior. The second argument is a hash reference of options. They are currently:

    prefix

    The prefix of any links. In HTML mode, this is the path to the Wiki. The actual linked item itself will be appended to the prefix. This is useful to create full URIs:

    { prefix => 'http://example.com/wiki.pl?page=' }

    extended

    A boolean flag, false by default, to use extended linking semantics. This comes from the Everything Engine (http://everydevel.com/), which marks links with square brackets. An optional title may occur after the link target, preceded by an open pipe. These are valid extended links:

    [a valid link]
    [link|title]

    Where the linking semantics of the destination format allow it, the result will display the title instead of the URI. In HTML terms, the title is the content of an A element (not the content of its HREF attribute).

    You can use delimiters other than single square brackets for marking extended links by passing a value for extended_link_delimiters in the %tags hash when calling format.

    implicit_links

    A boolean flag, true by default, to create links from StudlyCapsStringsNote that if you disable this flag, you should probably enable the extended one also, or there will be no way of creating links in your documents. To disable it, use the pair:

    { implicit_links => 0 }

    absolute_links

    A boolean flag, false by default, which treats any links that are absolute URIs (such as http://www.cpan.org/) specially. Any prefix will not apply and the URIs aren't quoted. Use this in conjunction with the extended option to detect the link.

    A link is any text that starts with a known schema followed by a colon and one or more non-whitespace characters. This is a distinct subset of what URI recognizes as a URI, but is a good first-order approximation. If you need to recognize more complex URIs, use the standard wiki formatting explained earlier.

    The recognized schemas are those defined in the schema value in the %tags hash. The defaults are http, https, ftp, mailto, and gopher.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    translate Wiki | formatted text | Perl module | translate | Wiki | format

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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