Thanks for the quick response. Is there a simple way to do this without RESTBase? On Nov 6, 2015 10:32 AM, "Eric Evans" eevans@wikimedia.org wrote:
On Fri, Nov 6, 2015 at 10:18 AM, James Montalvo jamesmontalvo3@gmail.com wrote:
Can Parsoid be used to convert arbitrary HTML to wikitext? It's not clear to me whether it will only work with Parsoid's HTML+RDFa. I'm wondering
if
I could take snippets of HTML from non-MediaWiki webpages and convert
them
into wikitext.
That is possible, yes. For example (via RESTBase):
curl -X POST --header "Content-Type: application/x-www-form-urlencoded" --header "Accept: text/plain; profile="mediawiki.org/specs/wikitext/1.0.0 "" -d 'html=<h1>Heading</h1><p>Hello world</p>' " https://en.wikipedia.org/api/rest_v1/transform/html/to/wikitext"
-- Eric Evans eevans@wikimedia.org _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l