How do I launch Parsoid's conversion of my website?
Apparently, I succeeded in doing it, because I found an html copy of my site in a directory called localhost. (I'm running Ubuntu under Windows 10).
Parsoid seems properly installed. The command "curl -L http://localhost:8142/localhost/v3/page/html/Main_Page/ " gives the expected result and my website "http://localhost/mediawiki/" uses "VisualEditor".
My first question : how do I instruct Parsoid to start converting my whole site?
And secondly: how can I learn Parsoid to add ".html" to the links it creates ? At present it makes links like "<a href="/mediawiki/index.php/Dossier:Drebbels_Thermometer" title="Dossier:Drebbels Thermometer">"
On Apr 10, 2020, at 5:55 PM, Francis Franck francis.franck@gmail.com wrote:
How do I launch Parsoid's conversion of my website? Apparently, I succeeded in doing it, because I found an html copy of my site in a directory called localhost. (I'm running Ubuntu under Windows 10). Parsoid seems properly installed. The command "curl -L http://localhost:8142/localhost/v3/page/html/Main_Page/ " gives the expected result and my website "http://localhost/mediawiki/" uses "VisualEditor". My first question : how do I instruct Parsoid to start converting my whole site?
Sorry, can you clarify what you're trying to achieve?
Traditionally, Parsoid has been run as a service on the side that clients, like VE, can use to parse and serialize wikitext.
It sounds like you're trying to produce a static copy of your site for backup or offline use?
If so, maybe see the project here https://github.com/openzim/mwoffliner or this previous discussion https://lists.wikimedia.org/pipermail/wikitext-l/2020-February/000994.html
And secondly: how can I learn Parsoid to add ".html" to the links it creates ? At present it makes links like "<a href="/mediawiki/index.php/Dossier:Drebbels_Thermometer" title="Dossier:Drebbels Thermometer">"
We should probably tackle the first question beforehand because the usefulness of doing something like this will depend on it.
Parsoid doesn't really offer a configuration to readily do something like this so it would take some code modification.
Alternatively, you can take the output that Parsoid produces and write a script to parse the html, find all the links, and add the extension, with generic dom manipulation libraries.
wikitext-l@lists.wikimedia.org