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

use mediawiki API instead of wiki2html #4

Closed
WolfgangFahl opened this issue Mar 13, 2021 · 4 comments
Closed

use mediawiki API instead of wiki2html #4

WolfgangFahl opened this issue Mar 13, 2021 · 4 comments

Comments

@WolfgangFahl
Copy link

the mediawiki api allows to get the html for a page directly. Main.js seems to use a different approach. Isn't that redudant and a source of incompability in the html result?

@niebert
Copy link
Owner

niebert commented May 22, 2021

Good suggestion, thank you Wolfgang. Using the media wiki API directly may help to get directly the HTML. But there is still parsing required for the HTML source to do the conversion from HTML into the RevealJS syntax of the DOM tree. Also math syntax needs handling. One thing I have to consider is, that parsing the HTML tree can be also a challenge when the rendering generated HTML pages in Wikiversity changes. Currently I use Wiki2Reveal for lectures in mathematics with the backboard annotations . Did you test the mediawiki API in a WebApp - what are your experiences and your use-cases of the MediaWiki API, Wolfgang? Best regards,

@WolfgangFahl
Copy link
Author

WolfgangFahl commented May 23, 2021

@niebert - Engelbert thank you for the response.
https://www.semantic-mediawiki.org/wiki/User:WolfgangFahl shows presentations of the last few years i did which revolve around the use of the mediawiki-api. http://mediawiki-japi.bitplan.com/index.php/Main_Page was the first Java solution i created and it was integrated into some RESTFul services via Jersey. E.g. https://github.com/BITPlan/com.bitplan.wikitask is based on this which together with the http://www.rythmengine.org/ template engine used to be the main style of working with mediawiki content.

Recently I started being a research assistant at RWTH Aachen i5 and also changed the focus from Java to python So the wikipush toolkit is based on the MediaWiki API but uses python We do embed the solution into web services e.g. https://confident.dbis.rwth-aachen.de/dblpconf/ and http://ptp.bitplan.com/ do use this approach. The main usage is in https://pypi.org/project/pyWikiCMS/ though which separates the web frontend from the wiki backend.

@WolfgangFahl
Copy link
Author

I tried solving the reveal problem as in BITPlan/pyWikiCMS#20 but had no success so far.

@niebert
Copy link
Owner

niebert commented May 23, 2021

Maybe a sound integration of the current version wtf_wikipedia by Spencer Kelly will create a better foundation for Wiki2Reveal in the future. MediaWiki moved from a Javascript based Parsoid to bidirectional Python parser. So you did a better job than I did with the Javascript prototype of Wiki2Reveal.
Parsoid is a very solid parser maybe you could use Parsoid.

  • Split into sections
  • split the section into paragraphs,
  • use the down arrows to scroll down the page per paragraph in RevealJS if the page does not fit on slide,
    best regards,

@niebert niebert closed this as completed Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants