A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

86 righe
4.0 KiB

  1. v0.4 (unreleased):
  2. - Added support for Python 2.6.
  3. - Template.has() is now passed 'ignore_empty=False' by default instead of True.
  4. This fixes a bug when adding parameters to templates with empty fields, and
  5. is a breaking change if you rely on the default behavior.
  6. - The 'matches' argument of Wikicode's filter methods now accepts a function
  7. (taking one argument, a Node, and returning a bool) in addition to a regex.
  8. - Re-added 'flat' argument to Wikicode.get_sections().
  9. - Wikicode.get_sections() now returns sections in the correct order.
  10. - Wikicode.matches() now accepts a tuple or list of strings/Wikicode objects
  11. instead of just a single string or Wikicode.
  12. - Given the frequency of issues with the (admittedly insufficient) tag parser,
  13. there's a temporary skip_style_tags argument to parse() that ignores '' and
  14. ''' until these issues are corrected.
  15. - C code cleanup and speed improvements.
  16. v0.3.2 (released September 1, 2013):
  17. - Added support for Python 3.2 (along with current support for 3.3 and 2.7).
  18. - Renamed Template.remove()'s first argument from 'name' to 'param', which now
  19. accepts Parameter objects in addition to parameter name strings.
  20. v0.3.1 (released August 29, 2013):
  21. - Fixed a parser bug involving URLs nested inside other markup.
  22. - Fixed some typos.
  23. v0.3 (released August 24, 2013):
  24. - Added complete support for HTML Tags, including forms like <ref>foo</ref>,
  25. <ref name="bar"/>, and wiki-markup tags like bold ('''), italics (''), and
  26. lists (*, #, ; and :).
  27. - Added support for ExternalLinks (http://example.com/ and
  28. [http://example.com/ Example]).
  29. - Wikicode's filter methods are now passed 'recursive=True' by default instead
  30. of False. This is a breaking change if you rely on any filter() methods being
  31. non-recursive by default.
  32. - Added a matches() method to Wikicode for page/template name comparisons.
  33. - The 'obj' param of Wikicode.insert_before(), insert_after(), replace(), and
  34. remove() now accepts other Wikicode objects and strings representing parts of
  35. wikitext, instead of just nodes. These methods also make all possible
  36. substitutions instead of just one.
  37. - Renamed Template.has_param() to has() for consistency with Template's other
  38. methods; has_param() is now an alias.
  39. - The C tokenizer extension now works on Python 3 in addition to Python 2.7.
  40. - Various bugfixes, internal changes, and cleanup.
  41. v0.2 (released June 20, 2013):
  42. - The parser now fully supports Python 3 in addition to Python 2.7.
  43. - Added a C tokenizer extension that is significantly faster than its Python
  44. equivalent. It is enabled by default (if available) and can be toggled by
  45. setting `mwparserfromhell.parser.use_c` to a boolean value.
  46. - Added a complete set of unit tests covering parsing and wikicode
  47. manipulation.
  48. - Renamed Wikicode.filter_links() to filter_wikilinks() (applies to ifilter as
  49. well).
  50. - Added filter methods for Arguments, Comments, Headings, and HTMLEntities.
  51. - Added 'before' param to Template.add(); renamed 'force_nonconformity' to
  52. 'preserve_spacing'.
  53. - Added 'include_lead' param to Wikicode.get_sections().
  54. - Removed 'flat' param from Wikicode.get_sections().
  55. - Removed 'force_no_field' param from Template.remove().
  56. - Added support for Travis CI.
  57. - Added note about Windows build issue in the README.
  58. - The tokenizer will limit itself to a realistic recursion depth to prevent
  59. errors and unreasonably long parse times.
  60. - Fixed how some nodes' attribute setters handle input.
  61. - Fixed multiple bugs in the tokenizer's handling of invalid markup.
  62. - Fixed bugs in the implementation of SmartList and StringMixIn.
  63. - Fixed some broken example code in the README; other copyedits.
  64. - Other bugfixes and code cleanup.
  65. v0.1.1 (released September 21, 2012):
  66. - Added support for Comments (<!-- foo -->) and Wikilinks ([[foo]]).
  67. - Added corresponding ifilter_links() and filter_links() methods to Wikicode.
  68. - Fixed a bug when parsing incomplete templates.
  69. - Fixed strip_code() to affect the contents of headings.
  70. - Various copyedits in documentation and comments.
  71. v0.1 (released August 23, 2012):
  72. - Initial release.