Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
wikitext-asymptote
Custom wikitext parser to produce html, plain text fields and relevant links from wikipedia page source code.
Readme
Custom wikitext parser to produce html, plain text fields and relevant links from wikipedia page source code.
To install the wikitext_asymptote
package, simply run
pip install wikitext_asymptote
You can then use the package as follows:
import wikitext_asymptote as wa
# Raw wikitext goes here
page = """..."""
# Parse it
parsed_page = wa.parse_page(page)
# parsed_page contains fields for html, plain text or links
print(parsed_page)
# parsed_page = {
# 'html': '...',
# 'text': '...',
# 'opening_text': '...',
# 'auxiliary_text': [...],
# 'heading': [...],
# 'links': [...]
# }
This package was created to fulfill the precise needs for parsing wikitext in the context of the EPFL Graph project, which are a bit more involved than the defaults from mwparserfromhell
.
However, the task of parsing wikitext taking into account all its syntax is gigantic. Already deciding, not even implementing, the parsing of each template in the myriad that's available, with all its variations, is virtually unfeasible.
Hence, the approach we have decided to commit to is that of approximation (hence Asymptote). We try to parse a number of templates, tags and other entities as correctly as possible, in a way that most cases are covered. In addition, we also have defaults, which may or may not be adequate for some cases. This implies that the parsed output is not perfect, and that is by design. From that point on, we work on a case-by-case basis to include parsing for new templates, tags or other entities, should the need arise.
Wikitext asymptote is built on top of the mwparserfromhell
package, so we acknowledge and are grateful for the work of their creators.
FAQs
Custom wikitext parser to produce html, plain text fields and relevant links from wikipedia page source code.
We found that wikitext-asymptote demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.