Permalink
Switch branches/tags
Nothing to show
Commits on Apr 16, 2012
  1. Merge pull request #40 from cburgmer/master

    Fix rendering of h[1-6] titles in text post-processing. Thanks!
    peter17 committed Apr 16, 2012
  2. Fix rendering of h[1-6] titles in text post-processing

    Christoph Burgmer committed Apr 16, 2012
Commits on Mar 13, 2012
Commits on Oct 27, 2011
Commits on Oct 24, 2011
  1. Handle \t in input; close #37

    peter17 committed Oct 24, 2011
  2. Add missing preprocessorParser.py

    lrowe committed with peter17 Oct 17, 2011
  3. Remove import of mutagen.

    I don't know what that was doing there.
    committed with peter17 Oct 17, 2011
Commits on Oct 17, 2011
  1. Add missing preprocessorParser.py

    lrowe committed with Oct 17, 2011
  2. Remove import of mutagen.

    I don't know what that was doing there.
    committed Oct 17, 2011
Commits on Aug 4, 2011
  1. Solve bugs and add tests for them.

     * Allow / in template names.
     * Allow wikitext in table cells
     * Allow newline inside template parameters but not at the end
    peter17 committed Aug 4, 2011
Commits on Aug 3, 2011
  1. Solve 3 bugs in templates preprocessing; add tests

    Also: improve rendering of README.rst
    peter17 committed Aug 3, 2011
  2. Add basic documentation in README.rst

    Also: move the current content of README.rst to parsers.rst to keep a
    trace of the research work we have done.
    peter17 committed Aug 3, 2011
Commits on Aug 2, 2011
  1. Make <body> tag generation optional (closes #31).

    Parsing with the 'wikitext' parser will parse and render as expected and
    do nothing more. This is useful for the inclusion of the article content in
    a larger HTML page.
    
    Parsing with the 'body' parser will also add the <body>...</body> tags
    and the interwiki links and category links. This is useful to mimic the
    behavior of MediaWiki's parser when rendering a whole article as a web
    page.
    peter17 committed Aug 2, 2011
Commits on Aug 1, 2011
  1. Merge branch 'preprocessor' and Erik's master.

    Resolved conflict:
    	tests/__init__.py
    peter17 committed Aug 1, 2011
  2. Correct tag balancing problem (closes #30).

    Also: improve code style in apostrophes.py
    peter17 committed Aug 1, 2011
Commits on Jul 31, 2011
  1. Improve rendering for the given example.

    This is adding support for void template parameter in the preprocessor
    and support for multiline table cell content in the parser and
    postprocessor.
    
    Tests added for those two cases.
    peter17 committed Jul 31, 2011
Commits on Jul 30, 2011
  1. Add HTML rendering for internal links.

    This includes rendering for categories, interwiki links and media files.
    
    Also: add a full test: parsing an article from the French Wikipedia. To
    run it, launch "python parser.py" and look at article.htm
    peter17 committed Jul 30, 2011
  2. Smash parseAllQuotes().

    All those lines--I can't look.
    committed Jul 30, 2011
  3. Improve style and possibly speed of apostrophe parser.

    enumerate() instead of zip() will save copying all the split bits of the string once for each loop.
    committed Jul 30, 2011
  4. Make some style (and speed) improvements to the test harness.

    Mostly, import things once, at the top, and let things have distinct names.
    committed Jul 30, 2011
  5. Correct usage of the apostrophe parser (solve #29)

    We had a stupid apostrophe parsing problem because we were parsing the
    whole text instead of doing that line by line as the parser expects.
    I added tests for this weird case.
    
    Also: update apostrophe.py to be closer to MediaWiki's code.
    
    Also: add docstring for the parameters of html.make_parser()
    peter17 committed Jul 30, 2011
Commits on Jul 28, 2011
  1. Implement tag balancing for the HTML postprocessor

    All open tags should be closed, in the right order (if no closing tag,
    add it). A closing tag must close an open tag (if not, remove it).
    
    Of course, the tags in "<br> and </br>" are not open/close tags, so
    they will be automagically converted to: "<br /> and <br />".
    peter17 committed Jul 28, 2011
  2. Pass allowed tags/attributes to HTML postprocessor

    This allows to choose which tags and attributes will be allowed by the
    HTML postprocessor. Each instance of it can have different lists instead
    of using predefined lists.
    
    Also: clean a little the postprocessors.
    peter17 committed Jul 28, 2011
  3. Add bold & italic rendering in text postprocessor.

    This new version of apostrophe.py allows to choose what the italic and
    bold tags will be. e.g.: <b>...</b>, <strong>...</strong> or *...*
    peter17 committed Jul 28, 2011
Commits on Jul 27, 2011
  1. Implement HTML rendering for lists.

    The code is not perfect and needs cleaning.
    peter17 committed Jul 27, 2011
  2. Correct implementation of bold/italic rendering.

    The syntax '''{{template}}''' now returns the expected value.
    
    The apostrophe postprocessor outputs HTML; that's why it was removed
    from the raw postprocessor and the other tests.
    peter17 committed Jul 27, 2011
Commits on Jul 26, 2011
  1. Fix nested templates rendering.

    They are now correctly nested in HTML.
    peter17 committed Jul 26, 2011
Commits on Jul 25, 2011
Commits on Jul 21, 2011
  1. Improve the structure of the postprocessors.

    We get rid of the need for repeating 3 times each function name.
    
    This is a first step, as we are thinking of a class-based structure.
    peter17 committed Jul 21, 2011
  2. Add rendering for allowed and disallowed HTML tags

    In the HTML preprocessor, the allowed tags are cleaned (only the allowed
    parameters are kept) and output as HTML and the disallowed tags are output as text.
    
    In the text preprocessor, the allowed tags are rendered by specific
    functions and the disallowed ones are output as text.
    peter17 committed Jul 21, 2011