Convert Wiki format text file to HTML page

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mrby

    Convert Wiki format text file to HTML page

    Hi,

    I see that Wiki's method of editing HTML is rather
    simple, for example:
    Using *bold* for bold text, and using _itatics_ for
    itatic font text.
    I wonder if there is available code for this purpose?

    Thanks much!


  • R. Rajesh Jeba Anbiah

    #2
    Re: Convert Wiki format text file to HTML page

    "mrby" <bianying@msn.c om> wrote in message news:<c8lbci$fs g$1@mail.cn99.c om>...[color=blue]
    > Hi,
    >
    > I see that Wiki's method of editing HTML is rather
    > simple, for example:
    > Using *bold* for bold text, and using _itatics_ for
    > itatic font text.
    > I wonder if there is available code for this purpose?[/color]

    Not sure, which Wiki software use such syntax. You may use some
    regular expressions for that. Or number of Wiki written in PHP are
    available on the net. You may look at the source codes.
    <http://www.google.com/search?q=php+wi ki>

    --
    | Just another PHP saint |
    Email: rrjanbiah-at-Y!com

    Comment

    • Tim Van Wassenhove

      #3
      Re: Convert Wiki format text file to HTML page

      In article <abc4d8b8.04052 32042.50a2eb72@ posting.google. com>, R. Rajesh Jeba Anbiah wrote:[color=blue]
      > "mrby" <bianying@msn.c om> wrote in message news:<c8lbci$fs g$1@mail.cn99.c om>...[color=green]
      >> Hi,
      >>
      >> I see that Wiki's method of editing HTML is rather
      >> simple, for example:
      >> Using *bold* for bold text, and using _itatics_ for
      >> itatic font text.
      >> I wonder if there is available code for this purpose?[/color]
      >
      > Not sure, which Wiki software use such syntax. You may use some
      > regular expressions for that. Or number of Wiki written in PHP are
      > available on the net. You may look at the source codes.
      ><http://www.google.com/search?q=php+wi ki>[/color]

      Only using regular expressions for textparsing is usually not a good
      idea. First problem you encounter are nested *tags*

      Perhaps you could have a look at the HTML_BBCodePars er package
      (http://pear.php.net) and rewrite the basic filter to suit your needs?


      --
      Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>

      Comment

      • Quirk

        #4
        Re: Convert Wiki format text file to HTML page

        The easies way to do this is to use a wrapper script around txt2tags:

        Download txt2tags text converter for free. Txt2tags converts a text file with minimal markup to HTML, XHTML, SGML, LaTeX, Lout, UNIX Man Page, Wikipedia, Google Code Wiki, DokuWiki, MoinMoin, MagicPoint(mgp), PageMaker. Features: simple, fast, automatic TOC, macros, filters, include, GUI/CLI/


        copy the txt2tags file into your webroot, in your 'edit mode' submit a
        form to it with the correct paarmenters to convert your trivial mark
        up into html, in your 'view' mode, include the html.

        This is only one simple way.

        Cheers.


        "mrby" <bianying@msn.c om> wrote in message news:<c8lbci$fs g$1@mail.cn99.c om>...[color=blue]
        > Hi,
        >
        > I see that Wiki's method of editing HTML is rather
        > simple, for example:
        > Using *bold* for bold text, and using _itatics_ for
        > itatic font text.
        > I wonder if there is available code for this purpose?
        >
        > Thanks much![/color]

        Comment

        • mrby

          #5
          Re: Convert Wiki format text file to HTML page

          >[color=blue]
          > Only using regular expressions for textparsing is usually not a good
          > idea. First problem you encounter are nested *tags*
          >
          > Perhaps you could have a look at the HTML_BBCodePars er package
          > (http://pear.php.net) and rewrite the basic filter to suit your needs?
          >
          >
          > --
          > Tim Van Wassenhove <http://home.mysth.be/~timvw/contact.php>[/color]

          I found such a package in the same site!


          It seems exactly what I wanted

          Thanks much!


          Comment

          Working...