Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ActionParse API (only with Parsoid ?) #2127

Open
benoit74 opened this issue Jan 6, 2025 · 1 comment
Open

Add support for ActionParse API (only with Parsoid ?) #2127

benoit74 opened this issue Jan 6, 2025 · 1 comment

Comments

@benoit74
Copy link
Contributor

benoit74 commented Jan 6, 2025

Currently, on stock mediawiki (not wikipedia) mwoffliner uses either REST API or Visual Editor.

These are often not available, see e.g. openzim/zim-requests#1244

Why are we not using the ActionParse API? It looks like this API is capable to provide decent HTML and I'm pretty sure it was possible to use this with mwoffliner in the past, but I fail to find PR / issues indicating that we decided to remove it, so I might be completely wrong.

See e.g. https://rationalwiki.org/w/api.php?action=parse&format=json&prop=text|modules|jsconfigvars|headhtml&page=Main_Page for sample HTML provided by this API.

Using this API is more or less what is suggested in #1899 despite in this PR we force the use of the parsoid parser:

https://rationalwiki.org/w/api.php?action=parse&format=json&prop=text|modules|jsconfigvars|headhtml&parsoid=1&page=Main_Page

Maybe forcing the Parsoid Parser is OK as well, it would restrict to Mediawiki 1.35+, but 1.35 is already an obsolete version, released in September 2020, so this is not really a strong requirement: https://www.mediawiki.org/wiki/MediaWiki_1.35

@benoit74
Copy link
Contributor Author

Gentoo wiki use case is interesting because (as of today) it is a 1.35 version (where Parsoid is supposed to be available but parameter is still unknown in the API)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants