A Python parser for MediaWiki wikicode https://mwparserfromhell.readthedocs.io/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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