Html2wt: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== Transforming HTML to WikiText == | == Transforming HTML to WikiText == | ||
Transforming (hopefully well-formed) HTML to WikiText is required if you want to import HTML content into a wiki. Some editors do well at this, and perhaps the best editor to do this is the [[Visual | Transforming (hopefully well-formed) HTML to WikiText is required if you want to import HTML content into a wiki. Some editors do well at this, and perhaps the best editor to do this is the [[Visual editor]] which now is the default editor for the MediaWiki project. | ||
== Parsoid == | == Parsoid == | ||
The [[mw:Parsoid]]<ref>Git repo https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FParsoid</ref> project gives the ability to parse HTML, however the results definitely need to be examined to see how it might be able to work | The [[mw:Parsoid]]<ref>Git repo https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FParsoid</ref> project gives the ability to parse HTML, however the results definitely need to be examined to see how it might be able to work. Take a look at the [[mw:Parsoid/MediaWiki DOM spec]] for capabilities. | ||
Example usage | |||
<source lang="bash">cat uvm.html | webapps/wiki/extensions/parsoid/tests/parse.js --html2wt</source> | <source lang="bash">cat uvm.html | webapps/wiki/extensions/parsoid/tests/parse.js --html2wt</source> | ||